[Issue 1752] 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 18:16:32 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1752
------- Comment #1 from grahamc001uk at yahoo.co.uk 2007-12-28 20:16 -------
This simple patch is good enough to fix the date of daylight savings adjustment
in all EU timezones. It is not general enough to cope with any customized
timezone (those with an adjustment in the last week of Feb or Jun or Sep).
There still appears to be a problem with the time of day when some daylight
savings adjustments are made in EU timezones - some occurring at 11pm UTC
instead of 1am UTC. This does not fix that.
mday += (st.wDay - 1) * 7 + 1;
// Start of patch. Insert into file std\date.d at line 744
if (mday>30 && (mday>31 || month==3 || month==10))
mday -= 7;
// End of patch.
//printf("month = %d, wDayOfWeek = %d, wDay = %d, mday = %d\n",
st.wMonth, st.wDayOfWeek, st.wDay, mday);
--
More information about the Digitalmars-d-bugs
mailing list