[Win] 17 different JSC tests started to fail in DST
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Mar 2015 02:34:04 +0000 (02:34 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Mar 2015 02:34:04 +0000 (02:34 +0000)
commit0af47462df8e36f1ef7fb7cd963ae467ccc4ed5c
tree8d2631d50483419c1dbae932db06c8df6b64b755
parentde87e4dae7345e8df0ff8a0c62a84268b62291af
[Win] 17 different JSC tests started to fail in DST
https://bugs.webkit.org/show_bug.cgi?id=142531

Reviewed by Chris Dumez.

The stock 'GetTimeZoneInformation' call does not always match the actual Daylight
Savings calendar. This results in a period of time when these tests fail.

If available, we should take advantage of the new 'GetTimeZoneInformationForYear',
which accesses a dynamic calendar of DST dates, which is presumbably updated by
Microsoft from year-to-year.

* wtf/DateMath.cpp:
(WTF::timeZoneInformationForYearFunction): New function to conditionally access
some Vista (and newer) functionality.
(WTF::calculateUTCOffset): Call new function (if available) to calculate proper UTC
time offset.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/DateMath.cpp