]> git.saurik.com Git - wxWidgets.git/commit
Use current time, not the Epoch for time zone determination.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Nov 2011 12:06:43 +0000 (12:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Nov 2011 12:06:43 +0000 (12:06 +0000)
commit2673c2394a75a7aa20f47667085db946b4bf3211
treefcbe29f4c4fbd544270fdc2d4f76ac5c6a3b7558
parent12a7fb5f0bfa6a6c9b5634eca3144490d6403aca
Use current time, not the Epoch for time zone determination.

When deducing the time zone from struct tm tm_gmtoff field, query tm for the
current time and not the Epoch as the DST rules -- and hence the time zone
offset -- could have changed since 1970. This is notably the case for Ireland
which used a different time zone from 1968 to 1971.

Notice that GetTimeZone() still must return the time zone without taking DST
into account, so we explicitly compensate for DST if it's in effect.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/datetime.cpp