WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 137458
[Win] DateMath's calculateUTCOffset does not account for Daylight Savings Time
https://bugs.webkit.org/show_bug.cgi?id=137458
Summary
[Win] DateMath's calculateUTCOffset does not account for Daylight Savings Time
Brent Fulgham
Reported
2014-10-06 13:23:07 PDT
The code for the Windows path of "calculateUTCOffset" ignores the return value of GetTimeZoneInformation, and always acts as though the running machine is in the standard time zone. This documentation in <
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724421(v=vs.85).aspx
> clearly indicates a daylight-savings-time-specific return value that indicates that you should use the "daylight bias" portion of the time zone struct to calculate the correct offset.
Attachments
Patch
(2.57 KB, patch)
2014-10-06 13:30 PDT
,
Brent Fulgham
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-10-06 13:24:12 PDT
<
rdar://problem/18559172
>
Brent Fulgham
Comment 2
2014-10-06 13:30:43 PDT
Created
attachment 239351
[details]
Patch
Brent Fulgham
Comment 3
2014-10-06 13:31:11 PDT
This bug may be why certain date-related tests are failing depending on user's time zone.
Geoffrey Garen
Comment 4
2014-10-06 13:34:35 PDT
Comment on
attachment 239351
[details]
Patch r=me It would be nice to get clarity on whether our existing tests cover this, and to add a test to cover this if it's not already covered.
Brent Fulgham
Comment 5
2014-10-06 17:39:35 PDT
(In reply to
comment #4
)
> (From update of
attachment 239351
[details]
) > r=me > > It would be nice to get clarity on whether our existing tests cover this, and to add a test to cover this if it's not already covered.
We have tests that check for correct calculation of DST-related dates, but we don't have a test that places the test machine in DST or Standard time zones for running the tests. This patch corrects a problem where the local machine state was not being accounted for when computed the time offset compared to UTC. I'll think about this and see if we can come up with a reliable way to toggle this state during test runs.
Brent Fulgham
Comment 6
2014-10-06 17:42:19 PDT
See also <
https://bugs.webkit.org/show_bug.cgi?id=137473
> for better testing for this feature.
WebKit Commit Bot
Comment 7
2014-10-06 18:15:22 PDT
Comment on
attachment 239351
[details]
Patch Clearing flags on attachment: 239351 Committed
r174377
: <
http://trac.webkit.org/changeset/174377
>
WebKit Commit Bot
Comment 8
2014-10-06 18:15:26 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug