[Issue 1752] New: std.date.LocalTimetoUTC applies wrong daylight savings time adjustments in EU timezones

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 28 15:36:01 PST 2007


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

           Summary: std.date.LocalTimetoUTC applies wrong daylight savings
                    time adjustments in EU timezones
           Product: D
           Version: 1.024
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: grahamc001uk at yahoo.co.uk


Uncommenting the 'printf()' in std\date.d line line 744 gives output like (for
years 2003 2004):

month = 10, wDayOfWeek = 0, wDay = 5, mday = 33
month = 3, wDayOfWeek = 0, wDay = 5, mday = 30

month = 10, wDayOfWeek = 0, wDay = 5, mday = 31
month = 3, wDayOfWeek = 0, wDay = 5, mday = 35

mday goes beyond the last day of October 2003 and March 2004 (an likewise in
future years) causing daylight savings time adjustments to be applied on the
wrong dates.

I am in the GMT time zone. The problem is probably present in all EU timezones
where the daylight savings change takes place on the last Sunday in March and
October (so windows function GetTimeZoneInformation() returns a 5 in the week
of the month fields where the change is applied).


-- 



More information about the Digitalmars-d-bugs mailing list