Closed
Bug 257291
Opened 21 years ago
Closed 21 years ago
Javascript error displayed in text windows
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dcn, Assigned: bugzilla)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
The page delivers a Javascript time zone converter. Enter your location and the
GMT text window should display the UTC time. It displays a partly garbled text
string instead. This is most likely due to the Javascript getting the local
system time string wrong (top text box).
It works in IE6 and Opera7 and even Netscape 4.7, but breaks in Firefox 0.9.1
and Netscape 7.1 (therefore a Mozilla bug?) The page is bad HTML but it renders
in all browsers, and fixing the HTML does not fix the Javascript error
Reproducible: Always
Steps to Reproduce:
1.load URL
2. (enter location)
3.
Actual Results:
1. local system time is incorrect, 2. results in garbled text string in GMT text
box.
Expected Results:
local system time string should be displayed properly, and GMT calcuation should
give correct answer
Comment 1•21 years ago
|
||
There are a large number of problems with that page. The line causing the
problem you are describing is:
var a11=new Date(GMT)
It should be:
var a11=new Date()
or the GMT variable should have a value. Date("") returns "Invalid Date" in
firefox, but not in IE, which is why you get the messed up string displayed.
In any case, this is not a FF bug.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 2•21 years ago
|
||
*** Bug 257294 has been marked as a duplicate of this bug. ***
Comment 3•21 years ago
|
||
*** Bug 257294 has been marked as a duplicate of this bug. ***
| Reporter | ||
Comment 4•21 years ago
|
||
(Sorry, my comments were appended to the wrong - duplicate - bug) Here they are
again.
The problem actually appears to be the result of parsing the Date() string: FF
and Netscape7 produce a string like:
Sun Aug 29 2004 15:15:12 GMT+1000 (AUS Eastern Standard Time)
whereas Opera7 and IE6 produce:
Sun Aug 29 15:17:12 UTC+1000 2004
Which is correct?
(Also, I didn't log the bug twice. No idea how that happened)
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 5•21 years ago
|
||
Well, as I said, there a a bunch of problems with that site.
As for what is "correct", I don't think that there is a standard for this. You
can use getYear(), getDay() etc and avoid parsing the string completely.
Comment 6•21 years ago
|
||
See
http://www.topxml.com/javascript/javascript_date_functions.asp?printerversion=true
for info on different date return formats.
-> Invalid
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•