Closed Bug 1043967 Opened 10 years ago Closed 10 years ago

With French locale, the sort of the date is broken

Categories

(Release Engineering :: Release Automation: Other, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Sylvestre, Assigned: Sylvestre)

Details

(Whiteboard: [shipit])

Attachments

(1 file, 1 obsolete file)

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.
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.
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
Closed: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → sledru
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: