Closed
Bug 318454
Opened 19 years ago
Closed 16 years ago
new Date() returns wrong date (one day in future)
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 411726
People
(Reporter: abarrera, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Mozilla/7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Mozilla/7
The JavaScript Data Object is bad, because the date that is getting is one day later
I only see this bug in Linux,
Windows is Ok
Reproducible: Always
Steps to Reproduce:
1.
Write the file
<!-- bad_date.html -->
<html>
<head>
<title>Date Problem</title>
</head>
<body>
<script language="JavaScript">
document.write(new Date())
</script>
</body>
</html>
2.
Open it with Mozilla Firefox
3.
See the results
Actual Results:
Thu Dec 01 2005 16:58:52 GMT+1700 (MDT)
Expected Results:
Wed Nov 30 2005 16:58:52 GMT+1700 (MDT)
Updated•19 years ago
|
Assignee: nobody → js-console
Component: General → JavaScript Console
Product: Firefox → Core
QA Contact: general → jrgmorrison
Summary: JavaScript problme with Date() → new Date() returns wrong date (one day in future)
Version: unspecified → 1.7 Branch
Comment 1•17 years ago
|
||
I have firefox 2.0.0.12 with Ubuntu 7.10and have the problem.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12
I am on GMT-0430 (VET)
Actual date:
Wed Feb 20 2008 11:21:27 GMT-0430 (VET)
Data showed in firefox:
Thu Feb 21 2008 11:21:27 GMT+1930 (VET)
Comment 2•17 years ago
|
||
Er, oops. Picked a wrong component in 2005 :(
Seems similar to bug 65671 (see its dupes), although that one claims to be fixed.
Assignee: error-console → general
Component: Error Console → JavaScript Engine
QA Contact: jrgmorrison → general
Comment 3•17 years ago
|
||
the VET issue sounds like bug 411726 (which is supposed to be mac only)
What is MDT? Certainly not Mountain Daylight Time...
Comment 5•17 years ago
|
||
I do not have a TZ variable set.
My Ubuntu box uses:
/etc/localtime
Timezone = Americas/Caracas
I "recompiled" the TimeZone because last December 9th our country changed its TZ from -0400 GMT to -0430 GMT
I don't know if this TZ change affected Firefox javascript Date object.
If you need more information just let me know.
./roko
I have this problem on Arch Linux with firefox (bon echo) version 2.0.0.12. I built my own copy of version 3 beta 3 and still have the problem. javascript:alert(new Date()) reports GMT+1500 (AKDT) when the Alaska Daylight time (AKDT) should be GMT-0800 and the current time, Alaska Standard time (AKST) should be GMT-0900.
My locale is set to en_US.utf8, my hardware clock uses UTC and my timezone is set to America/Juneau. I use glibc version 2.7 and /bin/date reports the time correctly, as do other applications.
Same problem here.
I created a html test file and opened it using firefox. The date displayed was:
Tue Oct 14 2008 16:48:58 GMT+1930 (VET) and the expected date was:
Mon Oct 13 2008 16:48:58
When the is opened using Konkeror, it returns the following:
Mon Oct 13 2008 16:55:55 GMT-0430
Also my TZ is Americas/Caracas.
I'm on Fedora 9. No environmental variable TZ. The problem seems to be here: (GMT+1930 vs GMT-0430)
Maybe this issue triggers the lightning bug 457749 also.
Heishiro.
Comment 8•16 years ago
|
||
Duping forward, and I will try to land the patch in bug 411726 today.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Comment 9•16 years ago
|
||
Re: comment #7 (from mitsurugi@cantv.net), what version of Firefox are you using?
Comment 10•16 years ago
|
||
Im using Firefox 3.0.2
In the about box there's the following info:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko/2008092318 Fedora/3.0.2-1.fc9 Firefox/3.0.2
You need to log in
before you can comment on or make changes to this bug.
Description
•