Closed Bug 309925 Opened 19 years ago Closed 19 years ago

Date and Time stamp on page appear as letters, possible JavaScript issue

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: epp, Assigned: bc)

References

()

Details

(Keywords: regression, verified1.8)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9a1) Gecko/20050924 SeaMonkey/1.1a
Build Identifier: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9a1) Gecko/20050924 SeaMonkey/1.1a

Date and time stamp for items to the right of the Top News, Business News,
Technology News, etc. headings, apppear as "MMM NaN, NaN:0NaN am ET" instead of
displaying the actual date and time.

I opened a Page Source window and it appears to be related to JavaScript.  

When the same page is viewed with Mozilla Firedox 1.0.7 Linux however,
(Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.12) Gecko/20050920
Firefox/1.0.7), the date and time appear correctly.





Reproducible: Always

Steps to Reproduce:
1.Load referenced web page.
2.Date and time appear as "MMM NaN, NaN:0NaN am ET", instead of displaying the
correct date and time.
3.

Actual Results:  
Date and time as described did not display as expected.

Expected Results:  
Software should have displayed correct date and time.
The page attempts to parse (with Date.parse) the date "Sep 24, 11:58 pm(ET) 105"
(105 is what Date.getYear() returns).  With current trunk, Date.parse returns "NaN".

This regressed between seamonkey trunk builds 2005072906 and 2005073005, which
means this is from bug 301738.

==> Javascript
Assignee: general → general
Status: UNCONFIRMED → NEW
Component: General → JavaScript Engine
Depends on: 301738
Ever confirmed: true
Keywords: regression
Product: Mozilla Application Suite → Core
QA Contact: general → general
Version: unspecified → Trunk
Assignee: general → bob
Attached patch patchSplinter Review
Since bug 301738, if the string contains a time HH:MM without seconds, the next
number will be treated as the seconds which in this case will result in the
year being treated as seconds. By protecting the assignment to sec with the
prevc value of ':', we prevent this from happening. This is the regression.

The second issue is if a '(' follows a number without an intervening space, a
syntax error occurs in Mozilla but IE does not treat it as such. 

This will make "Sep 24, 11:58 pm(ET) 105" and "Sep 24, 11:58 pm (ET) 105" both
valid dates.

This is wallpaper, but I'm not sure I want to try to do more.
Attachment #197319 - Flags: superreview?(brendan)
Attachment #197319 - Flags: review?(mrbkap)
RCS file: /cvsroot/mozilla/js/tests/js1_5/Date/regress-309925-01.js,v
done
Checking in regress-309925-01.js;
/cvsroot/mozilla/js/tests/js1_5/Date/regress-309925-01.js,v  <-- 
regress-309925-01.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/js/tests/js1_5/Date/regress-309925-02.js,v
done
Checking in regress-309925-02.js;
/cvsroot/mozilla/js/tests/js1_5/Date/regress-309925-02.js,v  <-- 
regress-309925-02.js
initial revision: 1.1
done
Flags: testcase+
Comment on attachment 197319 [details] [diff] [review]
patch

Gross, but I guess it falls under Postel's rule.

/be
Attachment #197319 - Flags: superreview?(brendan) → superreview+
Comment on attachment 197319 [details] [diff] [review]
patch

r=mrbkap, well caught!
Attachment #197319 - Flags: review?(mrbkap) → review+
Checking in jsdate.c;
/cvsroot/mozilla/js/src/jsdate.c,v  <--  jsdate.c
new revision: 3.71; previous revision: 3.70
done

2005-09-26 21:10	bob%bclary.com 	mozilla/ js/ src/ jsdate.c 	3.71 	2/2  	Bug
309925, fix regression in parsing dates containing HH:MM caused by bug 301738,
r=mrbkap, sr=brendan
Comment on attachment 197319 [details] [diff] [review]
patch

Seeking approval for 1.8b5 for this simple, low risk fix to a regression.
Attachment #197319 - Flags: approval1.8b5?
Attachment #197319 - Flags: approval1.8b5? → approval1.8b5+
2005-09-27 19:35	bob%bclary.com 	mozilla/ js/ src/ jsdate.c 	3.69.2.2 
MOZILLA_1_8_BRANCH  	2/2  	Bug 309925, fix regression in parsing dates
containing HH:MM caused by bug 301738, r=mrbkap, sr=brendan, a=asa
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8
Resolution: --- → FIXED
v ff 1.5.0.1, 1.5, 1.6 20060217 win/linux/mac
Status: RESOLVED → VERIFIED
Keywords: fixed1.8verified1.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: