[Webkit-unassigned] [Bug 130967] erroneous date calculations on march 30, 2014 (CET/CEST time zone) the day on which daylight savings time changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 16 08:13:57 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=130967





--- Comment #10 from Byungseon Shin <xingri at gmail.com>  2014-04-16 08:14:13 PST ---
(From update of attachment 229431)
View in context: https://bugs.webkit.org/attachment.cgi?id=229431&action=review

>> Source/JavaScriptCore/ChangeLog:10
>> +        So, we need to calculate UTC instead of localTime milliseconds
> 
> What is the issue?  I tried evaluating "String(new Date("Mar 30 2014 01:00:00 UTC+0100”))” in Safari, Chrome, and Firefox (note: CET is UTC+1 according to http://www.timeanddate.com/library/abbreviations/timezones/), and they all show the same string.  You need a test case that demonstrates the issue and will serve as a regression test in the future.  If appropriate, please add the test case to an existing Date test.
> 
> Also, I fail to follow your logic here.  What does calculateLocalTimeOffset() have to do with your change in parseDateFromNullTerminatedCharacters()?

Could you please test it without setting Timezone explicitly while setting your system timezone to Spain(Madrid)?
It will shows you "Sun Mar 30 2014 00:00:00 GMT+0100 (CET)" instead of "Sun Mar 30 2014 01:00:00 GMT+0100 (CET)."

This issue came from parseDateFromNullTerminatedCharacters just convert "Mar 30 2014 01:00:00" to milliseconds without considering UTC when no TimeZone information provided.

>> Source/WTF/wtf/DateMath.cpp:470
>> +}
> 
> If we really need to export this, then let’s export calculateUTCOffset().  No need to create another function.

I will do it.

>> Source/WTF/wtf/DateMath.h:159
>>  using WTF::calculateLocalTimeOffset;
> 
> This shows that we should export WTF::calculateTimeOffset (if needed) instead of creating a WTF::getUTCOffset just to wrap it but adds nothing.

I will do it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list