Closed
Bug 187816
Opened 23 years ago
Closed 11 years ago
tva.gov - javascript date problem prevents data display
Categories
(Tech Evangelism Graveyard :: English US, defect)
Tech Evangelism Graveyard
English US
Tracking
(Not tracked)
RESOLVED
INVALID
Oct
People
(Reporter: mozilla, Unassigned)
References
()
Details
(Whiteboard: [technote-needed])
Attachments
(1 file)
3.40 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3a) Gecko/20021212
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3a) Gecko/20021212
In the site-specific pages accessible from
http://www.tva.gov/greenpowerswitch/solar_sites.htm , data and charts should be
displayed after valid dates are selected (and Go is hit). In Mozilla, an error
message like "You must select a date earlier than today's date. Today is January
5,." is displayed instead. iE 6.0 displays the data and charts.
Reproducible: Always
Steps to Reproduce:
1. Go to URL.
2. Scroll down, select valid previous date such as 04 January, 2002
3. Hit Go.
Actual Results:
Error message popup is displayed.
Expected Results:
Display site-specific "Fast Facts" table and solar power chart.
Using default theme, tabs. Saw other javascript date bugs listed, but didn't
wade through them all (sorry).
![]() |
||
Comment 1•23 years ago
|
||
The site seems to just be buggy... it basically does:
todays = ((new Date()) + '').split(' ');
and then assumes the last element in the array is the year (it's actually the
timezone name).
*** Bug 187820 has been marked as a duplicate of this bug. ***
Comment 3•23 years ago
|
||
Comment 4•23 years ago
|
||
Boris' analysis is correct. Load the reduced testcase and hit 'Test'.
In NN4.7 and IE6, the date passes as valid; in Mozilla, it doesn't.
As Boris says, the site assumes that the last element in a JavaScript
date is the year. This is true in NN4.7 and IE6, but not Mozilla.
Just try this HTML:
<script>
var dt = Date().toString();
document.write(dt);
</script>
NN4 ---> Mon Jan 06 23:16:02 GMT-0800 (Pacific Standard Time) 2003
IE6 ---> Mon Jan 06 23:15:59 2003
Moz ---> Mon Jan 06 2003 23:15:56 GMT-0800 (Pacific Standard Time)
That's what's causing the problem. The site should use the getFullYear()
method to get the year (NOTE: don't use the deprecated method getYear()).
Reassigning to Evangelism component -
Assignee: rogerl → bclary
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → US Gov
Ever confirmed: true
OS: Windows 98 → All
Product: Browser → Tech Evangelism
QA Contact: pschwartau → chrisn
Hardware: PC → All
Version: Trunk → unspecified
Comment 5•23 years ago
|
||
common enough to get a short note written about it.
Summary: javascript date problem prevents data display → tva.gov - javascript date problem prevents data display
Whiteboard: [technote-needed]
Comment 6•22 years ago
|
||
tech evang june 2003 reorg
Assignee: bc → english-us
Component: US Gov → English US
QA Contact: chrisn → english-us
Comment 7•22 years ago
|
||
contact info tvainfo@tva.gov
Status: NEW → ASSIGNED
Target Milestone: --- → Oct
Comment 9•17 years ago
|
||
still broken
Comment 10•11 years ago
|
||
Page no longer exists, closing.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•