www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5731] New: WindowsTimeZone has offsets from UTC backwards

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: jmdavisProg gmx.com



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: -------
Mar 12 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5731


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5731


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|WindowsTimeZone has offsets |std.datetime.SysTime prints
                   |from UTC backwards          |UTC offsets backwards
         OS/Version|Windows                     |All



PST ---
Okay. So, this isn't a WindowsTimeZone problem. It's a problem with SysTime's
string functions (toISOExtendedString in the example, but it's the same for all
of them) where they get the UTC offset backwards.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5731




PDT ---
Pull Request: https://github.com/D-Programming-Language/phobos/pull/18

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 14 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5731


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



PDT ---
Fixed:
https://github.com/D-Programming-Language/phobos/commit/2a9e456628df17cc79b47f95b4ee3e1a4b68e836

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