Bug 138427 - Incorrect timezone information used for British Standard time for 1970
Summary: Incorrect timezone information used for British Standard time for 1970
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-05 08:58 PST by Boris Zbarsky
Modified: 2016-07-18 21:09 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Zbarsky 2014-11-05 08:58:02 PST
Consider this expression:

  (new Date(0)).toLocaleString()

When run in the UK timezone, JavaScriptCore returns:

  "January 1, 1970 at 1:00:00 AM GMT+1"

which is correct: at the time BST was GMT+1 due to he British Standard Time experiment; see http://en.wikipedia.org/wiki/British_Summer_Time#Periods_of_deviation

However this expression:

  +(new Date(1970, 0, 1))

returns 0 in JavaScriptCore, whereas the correct value is -3600000, because the provided date/time is in local time, which was one hour ahead of GMT in 1970.