[Webkit-unassigned] [Bug 137140] New: Date.getDate() returns bad values in some time zones

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 25 22:45:03 PDT 2014


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

           Summary: Date.getDate() returns bad values in some time zones
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: daniel at herbolt.com


Steps to reproduce
1) Set time zone of your OS X to Sydney - Australia
2) run following code in Safari Developer console
 a)
 //Date '2014-10-05' is the first Sunday in October. It is date when DST is changing in Australia.
 var d = new Date(2014, 9, 5, 0, 0, 0, 0); // 2014-10-05 00:00:00
 d.toString();

 b) new Date(2014, 9, 5, 0, 0, 0, 0).getDate();
3) see result in console

Expexcted result:
2a) Sun Oct 05 2014 00:00:00 GMT+1000 (EST)
2b) 5

Actual result:
2a) Sat Oct 04 2014 23:00:00 GMT+1000 (EST)
2b) 4


Additional info:
 - APPLE BUG ID #13201479
 - http://www.timeanddate.com/time/aboutdst.html
 - http://stackoverflow.com/questions/14839244/why-is-safari-confused-about-date-getday-for-dst-start-in-sydney-aus-time-zon

 - It is also reproducible with New Zealand time zone with different date. Affected date is date of DST change.


Used software
Safari 7.1, Safari 8.0

-- 
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