With French locale, the sort of the date is broken

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: sylvestre, Assigned: sylvestre)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [shipit])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
Created attachment 8462578 [details] [diff] [review]
0001-Use-the-ISO-method-to-display-dates.patch

Dates are displayed using "localdate.toLocaleString" method.

However, from a locale to the other, this is too unpredictable and it is going to break the sort.

For example, the French locale will display
DD/MM/YYYY
and the sort will be done the day instead of the user.

The usage of the ISO 8601 fixes the issue:
2014-07-09T15:01:31.324Z

As an other argument:
http://xkcd.com/1179/
;)
Attachment #8462578 - Flags: review?(rail)
I've noticed this too (my locale string is set to Filipino). However, ISO 8601 strings are not terribly readable...I wonder if this can be fixed by fiddling with something in data tables? Ie, maybe there's a hidden attribute that can influence sorting, but doesn't affect the displayed date.
(Assignee)

Comment 2

4 years ago
Ben, I agree I have been lazy by picking ISO 8601. ;) I didn't care much since all users of this app are engineer.
 
However, will "2014-07-09 15:01:31" work for you?
(In reply to Sylvestre Ledru [:sylvestre] from comment #2)
> Ben, I agree I have been lazy by picking ISO 8601. ;) I didn't care much
> since all users of this app are engineer.
>  
> However, will "2014-07-09 15:01:31" work for you?

Yeah, I guess that's fine.
(Assignee)

Comment 4

4 years ago
Created attachment 8462605 [details] [diff] [review]
0001-Use-the-ISO-method-to-display-dates.patch

Piouf, I forgot how date management is a pain in Javascript.
I used Jquery for the date formating.

If we don't care about standard stuff, I could use:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleFormat
Attachment #8462578 - Attachment is obsolete: true
Attachment #8462578 - Flags: review?(rail)
Attachment #8462605 - Flags: review?(rail)
Attachment #8462605 - Flags: review?(bhearsum)
Comment on attachment 8462605 [details] [diff] [review]
0001-Use-the-ISO-method-to-display-dates.patch

Review of attachment 8462605 [details] [diff] [review]:
-----------------------------------------------------------------

I'd rather stick with standards compliant stuff. This looks fine. Rail is away for 2 weeks, so let's not block on him.
Attachment #8462605 - Flags: review?(rail)
Attachment #8462605 - Flags: review?(bhearsum)
Attachment #8462605 - Flags: review+
This changed is trivial enough. I just it to production.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(Assignee)

Updated

4 years ago
Assignee: nobody → sledru
You need to log in before you can comment on or make changes to this bug.