zonemaster / Zonemaster-GUI--ARCHIVED-OLD-VERSION-NOT-TO-BE-USED

Archived old implementation of the the Zonemaster Web GUI - not to be used
Other
3 stars 11 forks source link

Print dates in ISO 8601-format #36

Closed pawal closed 9 years ago

pawal commented 9 years ago

From @joelpurra on December 11, 2014 15:23

Current date format in the domain result history: 11.12.2014 16:17. To me this is "unparseable" as it introduces uncertainty (is the month 11 or 12?) for international usage. Try using the ISO 8601 standard instead.

Date and time (current at page generation) expressed according to ISO 8601:
Date:                           2014-12-11
Combined date and time in UTC:  2014-12-11T05:45:46+00:00
                                2014-12-11T05:45:46Z
Week:                           2014-W50
Date with week number:          2014-W50-4
Ordinal date:                   2014-345

Copied from original issue: dotse/zonemaster#279

pawal commented 9 years ago

From @mtoma on December 11, 2014 15:28

We can of course change this. But now the date should not be considered as ambiguous because it is printed according to the configuration of your browser.

pawal commented 9 years ago

From @joelpurra on December 11, 2014 15:34

@mtoma: there's pretty much no way that date format is my browser setting - it might be some library's incorrect definition of Swedish dates. Tested using Swedish settings in Firefox. https://en.wikipedia.org/wiki/Date_and_time_notation_in_Sweden

Also changed my browser language to English (US) - the same format was shown.

pawal commented 9 years ago

From @mtoma on December 12, 2014 9:10

Well this is what JavaScript thinks is the right way to show the date in string format. But we should change this to ISO format anyway.

pawal commented 9 years ago

From @joelpurra on December 12, 2014 10:6

@mtoma: localization is somewhat tricky, so guess the browser is not only looking at browser language settings, but also system settings. Ran these lines in the Firefox browser with Swedish as the only language listed.

new Date().toString()
"Fri Dec 12 2014 11:03:22 GMT+0100 (CET)"
new Date().toLocaleString()
"12/12/2014, 11:03:28 AM"

Just remembered that my Macbook was purchased in Canada, which use three different date systems - it's the reason I prefer ISO 8601. It's a mess ;) https://en.wikipedia.org/wiki/Date_and_time_notation_in_Canada

pawal commented 9 years ago

From @joelpurra on December 12, 2014 10:19

As a reference, my results in two different browsers with different language settings:

Test # 868
Executed at 12.12.2014 11:16 
Test nummer 868
Körd 12.12.2014 11:16