Closed
Bug 802627
Opened 13 years ago
Closed 8 years ago
JavaScript Date.toString function generates incorrect time zone from Epoch (milliseconds=0) to less-than-Offset (17999999 in America/New_York)
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jschortz2, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20100101 Firefox/15.0.1
Build ID: 20120905151427
Steps to reproduce:
Sample code:
var d1=new Date(parseInt(document.forms[0].myDate1.value,10));
alert(d1.toString());
Input is a value from 0 (the Epoch) to 17999999 (less than my UTC offset, in Eastern time zone, i.e. America/New_York)
Actual results:
When input is zero, output from alert is "Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Daylight Time). DAYLIGHT!!!
Expected results:
Daylight savings time indication should be STANDARD. This happens for the entire range of input from 0 to 17999999. When input is <=(-1) or >=18000000, i.e. <Epoch or >=my UTC offset in milliseconds, the correct ("Standard") daylight indicator is displayed
Attachment #672392 -
Attachment mime type: text/plain → text/html
Updated•13 years ago
|
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Assignee | ||
Updated•11 years ago
|
Assignee: general → nobody
Comment 3•8 years ago
|
||
Fixed in https://hg.mozilla.org/mozilla-central/rev/b7ef07909cc4
Before (Win10):
new Date(0).toString()
"Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Daylight Time)"
After (Win10):
new Date(0).toString()
"Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time)"
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•