Closed
Bug 1366955
Opened 8 years ago
Closed 4 years ago
The date and time is displayed as NaN and undefined
Categories
(Firefox for Android Graveyard :: General, defect, P5)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: lgbrowser5, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; NetHelper70; CNS_UA; GWX:MANAGED; AD_LOGON=4C47452E4E4554; rv:11.0) like Gecko
Steps to reproduce:
Steps to reproduce:
1. Platform Version (M): NOS(7.0)
2. Firefox version (M): Firefox 53.0.2, Firefox Beta 54.0
3. Reproducible on LG Ref. device (M) : Yes / G5 device
4. Reproduce rate (M) : 100%
5. Issue Reported (M) : Internal
6. Issue Description (Wrong behavior) (M) : The date and time is displayed as NaN and undefined
7. Expected behavior (M) : The date and time should be displayed normally
8. Steps to reproduce (M) :
Firefox > http://m.sports.naver.com/comment/bestcomment.nhn
9. Screen Capture (M) : Yes
10. MORE INFORMATION (O): Chrome works normally
It's reproducible on PC Mozilla Firefox.
When it fixed, please share Engineering Report or Release info. for patches.
Actual results:
The date and time is displayed as undfined
Expected results:
The date and time should be displayed normally
| Reporter | ||
Comment 1•8 years ago
|
||
| Reporter | ||
Updated•8 years ago
|
Summary: undefined type NaN → The date and time is displayed as NaN and undefined
Comment 2•8 years ago
|
||
I bet this will be a website bug, but it's an interesting one.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(miket)
Comment 3•8 years ago
|
||
The Javascript in question is in a template called "commentListTemplate"
'<span class="bc_time"><b class="u_skip">작성시간</b><em class="bc_time_txt">{js sports.ccmt.dateFormat(=comment.modTime)}</em></span>',
and it's in the file
http://static.sports.naver.net/resources/mobile/2017/05/23/174706/js/generated/sportsComment.js
Updated•8 years ago
|
Comment 4•8 years ago
|
||
I think this is some kind of date parsing compat issue. That template calls a dateFormat method on the modTime prop of a comment, and returns a string.
Here's a sample datetime string:
sports.ccmt._commentList[0].modTime
"2017-05-30T17:21:59+0900"
And that returns a buncha NaNs:
sports.ccmt.dateFormat("2017-05-30T17:21:59+0900")
"NaN.'{mm}:undefined type'.0NaN 오후 0NaN:0NaN"
dateFormat is defined as:
function(e) {
var t = e.split(/[-T.]/),
n = new Date(t.slice(0, 3).join("/") + " " + t[3]),
r = {
format: "{yyyy}.{mm}.{0d} {ap} {0h}:{0i}",
ampmFormat: ["오전", "오후"]
};
return changeDateFormat(n, r)
}
I'm guessing new Date(foo) is returning NaN here. Will need to dig in and find out why... This may be Bug 1274354 territory.
Comment 5•8 years ago
|
||
The date that comes out after the split/slice is:
2017/05/30 17:21:59+0900
And sure enough, new Date() doesn't like this. Works fine on Chrome.
Tue May 30 2017 03:21:59 GMT-0500 (CDT)
I think your bug 1274354 assessment is correct.
Updated•8 years ago
|
Blocks: sm-date-parse
Updated•8 years ago
|
Flags: needinfo?(miket)
Comment 6•7 years ago
|
||
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195
Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
Comment 7•4 years ago
|
||
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
| Assignee | ||
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•