[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 07:50:04 PDT 2014


Mark Lam <mark.lam at apple.com> changed:

           What    |Removed                     |Added
 Attachment #229431|review?                     |review-
               Flag|                            |

--- Comment #9 from Mark Lam <mark.lam at apple.com>  2014-04-16 07:50:22 PST ---
(From update of attachment 229431)
View in context: https://bugs.webkit.org/attachment.cgi?id=229431&action=review

> Source/JavaScriptCore/ChangeLog:10
> +        String(new Date(Mar 30 2014 01:00:00)) is wrong in CET
> +        https://bugs.webkit.org/show_bug.cgi?id=130967
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        According to calculateLocalTimeOffset define,
> +         it accepts utcInMilliseconds as an Argument
> +        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()?

> Source/WTF/wtf/DateMath.cpp:470
> +double getUTCOffset() 
> +{
> +    return calculateUTCOffset();
> +}

If we really need to export this, then let’s export calculateUTCOffset().  No need to create another function.

> Source/WTF/wtf/DateMath.h:159
> +using WTF::getUTCOffset;
>  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.

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