Closed
Bug 112130
Opened 23 years ago
Closed 23 years ago
Javascript getDate function returns date one day in the future.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: andypiperuk, Assigned: rogerl)
References
()
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011013
BuildID: 20011013
The page referenced in the URL shows the date in the top left, based on a piece
of Javascript roughly as follows:
dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday")
monName = new Array ("January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December")
now = new Date
document.write(dayName[now.getDay()] + ", " + monName[now.getMonth()]
+ " " + now.getDate() + ".")
In both Mozilla and Galeon, this displays tomorrow's date. In Opera it displays
today's date correctly. There appears to be something wrong in the date parsing
code.
My timezone is GMT. I don't have any environment variables such as TZ set which
would modify this.
Reproducible: Always
Steps to Reproduce:
1. Visit the page in the URL shown.
2. Look at the date in the top left of the left-hand frame.
3.
Actual Results: Date (and day) displayed as tomorrow.
Expected Results: Shown today's date and day.
Comment 1•23 years ago
|
||
Build ID: 2001 11 26 03. Windows 2000. My local time is 14:09 GMT+1.
I see "Tuesday, November 27" in the top left corner. That's correct.
Messy Internet Exploder 5.5 says the same, by the way.
Reporter | ||
Comment 2•23 years ago
|
||
That's really weird - I'll recheck with the latest build as soon as I can, but
it's definitely buggy here.
Comment 3•23 years ago
|
||
20011126xx linux trunk.
I see the correct date (currently tuesday 27th)
but there is bug 71605 which is duped to bug 65671.
Marking as such
*** This bug has been marked as a duplicate of 65671 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 4•23 years ago
|
||
Verified Duplicate -
Andy, you are now cc'ed on the other bug; thank you for this report.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•