Global option to use ISO 8601 date format
Categories
(Thunderbird :: Preferences, defect)
Tracking
(Not tracked)
People
(Reporter: vladimir-csp, Unassigned, Mentored)
References
Details
(Whiteboard: [lang=c++])
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
I recently posted a comment for bug 1426907, wherein I offered two fixes to deal with date/time formatting problems in Thunderbird.
The second fix I describe there directly addresses this issue.
Comment 15•6 years ago
|
||
Zibi, FCqzsFMrsieN3hpkERKg; vladimir-csp; et al. This was a very informative and well written bug report. It is interesting that en_DK formatting was (before all this mess began) not quite technically ISO 8601, rather closer to RFC 3339 partial time.
To my needs, FCqzsFMrsieN3hpkERKg's solution addresses all reasonable concerns: it yields an unambiguous, sort-able, internationally comprehensible date and time format that follows expected endian precedence.
I feel this is a justifiable complication to the UI superseding standard selection of localization and language as it permits selection of an international standard (or the slightly more human readable RFC derivation thereof), something which by intent crosses national borders and boundaries. Further, reading through the vast volume of bugs reported after the en_DK hack stopped working, they come from users in many countries using many languages and yet the most common complaint is finding it difficult to specify the ISO 8061-like date and time formatting they had previously struggled to achieve.
That users are willing to read through reams of bug reports and attempt rather arcane commands suggests that for at least some (perhaps many) users, this is a presentation modality of significance.
While I see the very generalized value of Jeff Harp's approach and would certainly be happy with it if it appeared, my inclination is to privilege the international standard.
Comment 16•6 years ago
|
||
(In reply to gessel@blackrosetech.com from comment #15)
Zibi, FCqzsFMrsieN3hpkERKg; vladimir-csp; et al. This was a very informative and well written bug report. It is interesting that en_DK formatting was (before all this mess began) not quite technically ISO 8601, rather closer to RFC 3339 partial time.
http://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf
(older version, but probably still relevant)
My understanding is that the desired date/time format as discussed here is ISO 8601 with the following components, in order:
- "YYYY-MM-DD": Calendar date, complete representation, extended format (section 4.1.2.2)
- " ": T omitted (section 4.3.2)
- "hh:mm:ss": local time, complete representation, extended format (section 4.2.2.2).
Personally, I do think calling the format ISO 8601 would match user expectations. I'd happily use it whatever it is called, though. :)
-Corey
Comment 17•6 years ago
|
||
I am asking the CLDR folks for help with all of this. Please see my new ticket:
https://unicode.org/cldr/trac/ticket/12027
"CLDR should support (some variants of) ISO-8601 date formats."
Comment 18•6 years ago
|
||
(In reply to Len Weisberg from comment #17)
I am asking the CLDR folks for help with all of this. Please see my new ticket: https://unicode.org/cldr/trac/ticket/12027
Doesn't seem like much has happened there
Comment 19•5 years ago
|
||
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #11)
Thank you for your analysis! This is very valuable!
Based on it, I'd recommend to:
Select a name. Yes, it's one of the hardest problems in computer science,
but I believe we can do that! In particular, I naively believe that there
must be some precedence. Windows? Android? MacoS? Someone must have use
the format we're talking about and it must have some name. Let's find it!Write the patches. I'm happy to mentor anyone willing to dive into this,
but I will not have time to write the patches myself. Notice: It will
require some C++ knowledge, ability to build Firefox or Thunderbird, and I
will force you to write docs and tests because I like my module clean.
Consider yourself warned ;)Once we have (1) and (2) adding the UI to Thunderbird should be trivial.
Hi Zibi,
Are you still wiling to mentor the bug?
if yes, could you point me out to where I could start and maybe help me out by breaking this bug into small steps :)
Comment 20•5 years ago
|
||
Sadly, https://unicode.org/cldr/trac/ticket/12027 is 404, it seems that wasn't taken up.
As to naming, note that the ls
option --time-style=long-iso
yields exactly what seems to be the general preference:
gessel@dg-B300G5:~$ ls -l --time-style=long-iso
total 60
drwxr-xr-x 4 gessel gessel 4096 2016-08-30 23:00 Anki
drwxr-xr-x 2 gessel gessel 4096 2020-05-23 20:18 Desktop
drwxr-xr-x 2 gessel gessel 4096 2020-05-22 20:13 Documents
drwxr-xr-x 2 gessel gessel 4096 2020-05-23 20:59 Downloads
Therefore I'd argue, that like Gnu before, the name should be "long-iso"
https://www.gnu.org/software/coreutils/manual/html_node/Formatting-file-timestamps.html
'full-iso’
List timestamps in full using ISO 8601-like date, time, and time zone components with nanosecond precision, e.g., ‘2002-03-30 23:45:56.477817180 -0700’. This style is equivalent to ‘+%Y-%m-%d %H:%M:%S.%N %z’.
This is useful because the time output includes all the information that is available from the operating system. For example, this can help explain make’s behavior, since GNU make uses the full timestamp to determine whether a file is out of date.
gessel@dg-B300G5:~$ ls -l --time-style=full-iso
total 60
drwxr-xr-x 4 gessel gessel 4096 2016-08-30 23:00:37.180162000 +0300 Anki
drwxr-xr-x 2 gessel gessel 4096 2020-05-23 20:18:04.940169342 +0300 Desktop
‘long-iso’
List ISO 8601 date and time components with minute precision, e.g., ‘2002-03-30 23:45’. These timestamps are shorter than ‘full-iso’ timestamps, and are usually good enough for everyday work. This style is equivalent to ‘+%Y-%m-%d %H:%M’.
gessel@dg-B300G5:~$ ls -l --time-style=long-iso
total 60
drwxr-xr-x 4 gessel gessel 4096 2016-08-30 23:00 Anki
drwxr-xr-x 2 gessel gessel 4096 2020-05-23 20:18 Desktop
*‘iso’
List ISO 8601 dates for non-recent timestamps (e.g., ‘2002-03-30 ’), and ISO 8601-like month, day, hour, and minute for recent timestamps (e.g., ‘03-30 23:45’). These timestamps are uglier than ‘long-iso’ timestamps, but they carry nearly the same information in a smaller space and their brevity helps ls output fit within traditional 80-column output lines. The following two ls invocations are equivalent: '''
gessel@dg-B300G5:~$ ls -l --time-style=iso
total 60
drwxr-xr-x 4 gessel gessel 4096 2016-08-30 Anki
drwxr-xr-x 2 gessel gessel 4096 05-23 20:18 Desktop
It is my most sincere request that at least "long-iso" time and date formatting be provided as a completely independent option overriding any other locale or lcdr settings in Advanced->General->Date and Time Formatting:
[] Application locale:
[] Regional settings locale: (no apparently ignored)
[] long-iso format (YYYY-MM-DD HH:MM)
Deferring to Gnu's expertise and standard's setting concludes step 1: "name" - it is "long-iso" format. Now we just need some patches.
Comment 21•5 years ago
|
||
Unicode.org seems to have migrated to JIRA for bug tracking. The new URL seems to be https://unicode-org.atlassian.net/projects/CLDR/issues/CLDR-12027. Another relevant issue is CLDR-10014.
Ceterum censeo:
- A display format following the ISO 8601 component ordering is desirable.
- In the display format, separating date and time with a space instead of the
T
is also desirable, for readability. - Calling that either ISO 8601 or RFC 3339 is technically incorrect. Both support
T
as the only possible separator, and ISO 8601 also allows omitting the separator. The note in RFC 3339 “Applications using this syntax may choose, for the sake of readability, to specify afull-date
andfull-time
separated by (say) a space character.” does not mean space is a valid separator fordate-time
, only that applications may choose to forgo using thedate-time
grammar production in favor of crafting a custom rule fromfull-date
andfull-time
. It is implied that applications that do so necessarily lose some of the interoperability benefits. - Putting the technically incorrect name in high visibility software such as Firefox, Thunderbird, or GNU coreutils, leads to more confusion as to whether space is a valid separator in those standards.
- Therefore, please call it “international date format” or “sensible date format” or “big-endian date format” or something, but do not refer directly to ISO 8601 or RFC 3339.
Comment 22•5 years ago
|
||
No, RFC 3339 explicitly allows the use of space. It says:
NOTE: ISO 8601 defines date and time separated by "T". Applications using this syntax may choose, for the sake of readability, to specify a full-date and full-time separated by (say) a space character.
This paragraph was put into the RFC at my suggestion, precisely so that GNU
"date" output wouldn't have to contain that "T".Tf you want GNU 'date' to output the 'T', you can use 'date --iso-8601=s'
instead of 'date --rfc-3339=s'. That's the point of having these two options for
GNU 'date'. If it weren't for this difference in behavior, GNU 'date' wouldn't
have needed a --rfc-3339 option in the first place, and we shouldn't change the
meaning of --rfc-3339 to eviscerate the whole point of the option.
Yuri's points are valid and would tend to suggest that the options for ls
aren't consistent with the naming used in date. On my system:
gessel@dg-B300G5:~$ date --rfc-3339=s
2020-05-26 19:31:53+03:00
gessel@dg-B300G5:~$ date --iso-8601=s
2020-05-26T19:32:49+03:00
This seems fairly authoritative that the desired YYYY-MM-DD hh:mm representation is RFC 3339 compliant with respect to the space. Before adopting the nomenclature, adopting section 4.4's stern admonition against unqualified local time would be highly redundant in an inbox list, as it would usually be in a file list. Including TZ information would seem to contradict the spirit of section 5.2 and 5.4. Perhaps a revision to section 5.4 that specifically cites the highly redundant nature of lists of identical TZ offsets would add some clarity as gnu ls 'long-iso' is the desired format.
Note the 5.7's concluding paragraph is incorrect in light of changes included in ISO 8601-1:2019 ("24" is no longer permitted).
Comment 23•5 years ago
|
||
Paul Eggert does not believe omitting the time zone offset information is RFC 3339 compliant, so while a space between date and time is compliant, the desired format for the list is not.
As an additional reference, changeQuote calls "international format" this:
Date: Wed May 27 2020 04:39:39 GMT+0300 (Arabian Standard Time)
But you can use changeQuote to configure reply in RFC 3339 format as %Y-%m-%d %h:%i%z:
Date: 2020-05-27 04:39+0300
I do really like Yuri's "Sensible Date Format".
The addon ConfigDate enables showing headers with sender's time zone (not RFC 3339 compliant as it appends the TZ name where known (I like this myself)). I'm not sure why this isn't default - I usually know my timezone and am more interested in the sender's time zone.
This brings up another issue for Sensible Date Format to address: header formatting. My preference would be that SDF would format the folder view just as ls -l --time-style=long-iso
does and for the same reasons. On windows it would be nice to remove the vestigial comma field separator:
Windows display (implies two fields, a date field and a time field):
2020-05-26, 20:45
The list window in Sensible Date Format should show date and time as does the ls
"long-iso" as:
2020-05-26 20:45
I'm agnostic about what used to be the mail.ui.display.dateformat.today
option "0" default (what happened to those prefs?)
In header representation, in preview pane and open message window, the "Date" header would be formatted to full RFC 3339 format with sender offset default:
Date: 2020-05-27 05:22:00-0500
Appending the TZ code is a bonus for human readability. One could argue that prefixing the day of the week might also be useful information, despite the RFC 3339 redundancy argument. I'd argue that such details are best left as hooks that can be tweaked by restoring an options block to config:editor
How I'd configure it if I had the options:
Date: 2020-05-27 05:22:00-0500 (CDT)
The default core reply format header style should be the same RFC 3339 compliant format as Date header representation in preview and message views: (the changeQuote plugin permits any desired variations).
Indeed the entire naming and specifying technically correct formatting process could also be fully obviated by adding the following options to edit:config
:
Preference Name Status Type Value
mail.ui.display.dateformat.today modified string %D %H:%i
mail.ui.display.dateformat.thisweek modified string %m-%d, %D %H:%i
mail.ui.display.dateformat.default modified string %y-%m-%d %H:%i
mail.ui.dateheader.dateformat.preview modified string %y-%m-%d %H:%i%z
mail.ui.dateheader.dateformat.message modified string %y-%m-%d %H:%i%z (%t)
mail.ui.dateheader.dateformat.reply modified string %Y-%m-%d %H:%i:%s.%u%z (%T)
%Y = year, 4 digits ("1999")
%y = year, 2 digits ("99")
%m = month ("01" to "12")
%M = month, textual, English, 3 letters ("Jan")
%d = day of the month, 2 digits ("01" to "31")
%D = day of the week, textual, English, 3 letters ("Fri")
%H = hour, 24-hour format ("00" to "23")
%h = hour, 12-hour format ("01" to "12")
%i = minutes, ("0" to "59")
%s = seconds ("00" to "59")
%u = microseconds
%A = "AM" or "PM"
%a = "am" or "pm"
%z = timezone offset from UTC ("+0300")
%t = timezone abbreviation, if known ("AST")
%T = timezone name, if known ("Arabia Standard Time")
Then users can just configure ISO8601 compliant, RFC 3339 compliant or personal preference as they see fit without any "labels" being applied.
Comment 24•5 years ago
|
||
+1 to fully configurable formats by today
/thisweek
/default
, + maybe thisyear
. But bonus points if that uses standard placeholder designations as in strftime(3)
and date(1)
.
(Also, no need to support 2-digit years. That subformat should have been left in 1998.)
(Also, RFC 5322 does not provide for time zone names,
Comment 25•5 years ago
|
||
Sorry for sending an unfinished comment. As I was saying, RFC 5322 Date
header does not provide for time zone names, only offsets, and inferring a time zone from offset is generally not possible.
Comment 26•4 years ago
|
||
Providing edit:config user-formatting of time/date representations is the least controversial, most flexible, and most user-friendly way to alleviate the conundrum.
I, myself, like 2 digit year #s as a graphical representation - the millennium and century CE really aren't relevant to me and I'm not going to live to see the Y2.1k bug. There's no argument that the underlying data representation should be suitable for century transitions, but the on-screen representation can be efficient without confusion until ~2090-2110.
The coding difference to add a formatting placeholder for those of us that would prefer the abbreviated format is trivial. People who really want assurance they haven't accidentally spilled an energy drink on the hot tub controls can use %Y.
And, as originating time zone names are often known, %T seems like a user-friendly and useful feature. If it isn't known, omit an output.
Time and date is meaningful and useful in email. Giving the users the option to configure it to their preference seems like a very user-friendly thing to do.
Comment 27•4 years ago
|
||
Given the deference to CLDR, why not embrace Unicode Locale Data Markup Language (LDML) Part 4, edited by Peter Edberg and other CLDR committee members. In particular adopting the recommendations of section 8, Date Format Patterns as I suggested above as configurable variables that when defined explicitly override whatever formula Thunderbird defaults to in setting date format patterns. The variation from my suggestion would be full enumeration of the pattern fields and Date Field Symbol Table.
https://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
In particular, the era field, G, would fully alleviate any confusion that might arise for regular time travellers.
For example, this is lovely:
Pattern Result (in a particular locale)
yyyy.MM.dd G 'at' HH:mm:ss zzz 1996.07.10 AD at 15:08:56 PDT
Comment 28•4 years ago
|
||
Hi all. In bug 1509096 :dminor refactored our code to support custom patterns for date/time styles. In bug 1509096 comment 182 I documented how to test it. Can someone confirm whether it allows you get the desired behavior? We can work on UI changes to make such preferences setting easier later.
Comment 29•4 years ago
•
|
||
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #28)
Hi all. In bug 1509096 :dminor refactored our code to support custom patterns for date/time styles. In bug 1509096 comment 182 I documented how to test it. Can someone confirm whether it allows you get the desired behavior? We can work on UI changes to make such preferences setting easier later.
Correct link: bug 1426907 comment 182
Updated•2 years ago
|
Comment 30•2 years ago
|
||
(In reply to gshollingsworth+mozilla from comment #29)
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #28)
Hi all. In bug 1509096 :dminor refactored our code to support custom patterns for date/time styles. In bug 1509096 comment 182 I documented how to test it. Can someone confirm whether it allows you get the desired behavior? We can work on UI changes to make such preferences setting easier later.
Correct link: bug 1426907 comment 182
With that fixed, Is there anything left for us to do?
Comment 31•2 years ago
|
||
I think it's all done. Documentation can be found at https://support.mozilla.org/en-US/kb/customize-date-time-formats-thunderbird
Description
•