[Issue 5731] New: WindowsTimeZone has offsets from UTC backwards

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 12 00:32:15 PST 2011


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

           Summary: WindowsTimeZone has offsets from UTC backwards
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: jmdavisProg at gmx.com


--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-03-12 00:29:11 PST ---
This program:

import std.datetime;
import std.stdio;

void main()
{
    writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Pacific Standard
Time")));
    writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Eastern Standard
Time")));
    writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Greenwich Standard
Time")));
    writeln(SysTime(Date.init, WindowsTimeZone.getTimeZone("Romance Standard
Time")));
}


prints this:

0001-Jan-01 00:00:00+08:00
0001-Jan-01 00:00:00+05:00
0001-Jan-01 00:00:00+00:00
0001-Jan-01 00:00:00-01:00


Notice that the offsets are all the reverse of what they're supposed to be (+8
instead of -8, +5 instead of -5, etc.).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list