On 10-04-15 05:10 PM, Jesse Phillips wrote:
This bug was reported:

http://d.puremagic.com/issues/show_bug.cgi?id=2965

Ah, thank you. I see that importing std.datebase does indeed give
better results, though still not perfectly so:

    #!/usr/bin/dmd -run

    import std.datebase;
    import std.stdio;
    import std.date;

    void main() {
      // UTC first, then local
      writefln("UTC:   %s", toString(getUTCtime()));
      writefln("Local: %s", toString(UTCtoLocalTime(getUTCtime())));
    }

$ TZ=EST5EDT ./timedemo.d
UTC:   Fri Apr 16 08:56:04 GMT-0400 2010
Local: Fri Apr 16 04:56:04 GMT-0400 2010

The time is right, but the the tzoffset is wrong. That's not quite
what #2965 is reporting, so I'll file a new issue.

Thanks!
Graham

Reply via email to