www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17922] New: SysTime.to

https://issues.dlang.org/show_bug.cgi?id=17922

          Issue ID: 17922
           Summary: SysTime.to
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: neuranuz gmail.com

The following example prints unexpected `:00` at the end of formated date
string.

import std.datetime;
import std.stdio;

void main()
{
    SysTime dt = SysTime.fromISOExtString(`2017-10-21T12:59:34.196246+04`);
    writeln(dt);
    writeln(dt.toISOExtString());
    writeln(dt.toISOString());
}

Application output:
2017-Oct-21 12:59:34.196246+04:00
2017-10-21T12:59:34.196246+04:00
20171021T125934.196246+04:00

--
Oct 21