Open Bug 656502 Opened 14 years ago Updated 2 years ago

Add preference to define a custom date/time format

Categories

(Thunderbird :: Preferences, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: alexandre.f.demers, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/13.0.762.0 Safari/534.35 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 For all platforms, it should be possible to specify the date-time format desired. The date time format can be different from the locale (LC_TIME or LC_ALL) under Linux, different from system time under Windows and whatever it is called under OSX. Playing with locales under Linux is unfriendly. Moreover, the init.d folder trick proposed here and there that applied to TB2 doesn't work anymore. Finally, having this preference would easily a per profil setting. Many other applications allow this setting. Reproducible: Always Steps to Reproduce: Irrelevant Actual Results: Can't change the value in TB. Expected Results: Changing the default (empty) value would override the locale date time format. Here is what I see: Under Preferences -> Display -> Formatting, there should be a field where a user can specify the date time format manually. If the field is empty, then the default system value is used. Otherwise, it uses the user's prefered format. Changing this value would modify the date time format displayed for emails date and events date (under calendar).
Evolution as this preference. It proposes some date time formats, but allows the user to specify it's own format if wished.
This is already possible via an add-on, which I believe just sets some hidden preferences in Thunderbird: https://addons.mozilla.org/en-US/thunderbird/addon/configdate/
I already had a look at the add-on. The "configdate" add-on is not exactly what I'm suggesting. It only allows to change from different "formats" but not the way intended. It allows to change from short, to long, to default and so on. It only changes the value of date, not the time part of "date time". And there is no preference under about:config. The only way under Linux right now (since the init.d folder trick introduced under TB2 doesn't work in TB3) is to play with LC_ environment variables by either creating a script to set the values before launching TB or to set the LC values in an init script, which is inacceptable to accommodate a single application. Anyway, a user could also want to set the system date time in a given format, but have TB set in another format, whatever the platform is.
(In reply to comment #3) > I already had a look at the add-on. The "configdate" add-on is not exactly > what I'm suggesting. It only allows to change from different "formats" but > not the way intended. It allows to change from short, to long, to default > and so on. It only changes the value of date, not the time part of "date > time". And there is no preference under about:config. > > The only way under Linux right now (since the init.d folder trick introduced > under TB2 doesn't work in TB3) is to play with LC_ environment variables by > either creating a script to set the values before launching TB or to set the > LC values in an init script, which is inacceptable to accommodate a single > application. Anyway, a user could also want to set the system date time in a > given format, but have TB set in another format, whatever the platform is. "And there is no preference under about:config." I meant there is no preference under about:config that can be edited to change the time format (24 hour, 12 hour or 6 hour clock format).
Version: unspecified → Trunk
Jim, the request here (and in the bug just marked as a duplicate) is to add a preference to allow a different format for date and time than the system's ones. While usually the system time is what's used for Thunderbird's displayed time, there are cases where a different time format is desired without the need to change the format system wide. Some string template for date and time which default to the system's format would suffice, maybe something along the lines of the "date +%..." specifications on POSIX systems. Confirming as a valid RFE, no duplicate found.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Allow to set a different date time format → Add preference to define a custom date/time format
With the release of Thunderbird 60.0, the LC_TIME=en_DK trick no longer works to get thunderbird to display date/times in an ISO-8601 like format hence it is time to revisit this as a relevant RFE. Specifically, there need to be about:config string entries parallel to mail.ui.dateformat.{today,thisweek,default} (say mail.ui.dateformat.explicit.{today,thisweek,default} for arguments sake) that, when defined, override the current complex multi-lingual date-formatting code and allow the user to directly specify their own alternate date-formats ala the POSIX 'date' or 'strftime' implementations (or some equally flexible and powerful alternative). Thus a user who wishes times to be formatted in a idiosyncratic style such as "10:13 am Today", "Last Sun, 3:14 pm", and "2018/08/07 at 17:25" could simply create about:config entries: mail.ui.dateformat.explicit.today: "%I:%M %P Today" mail.ui.dateformat.explicit.thisweek: "Last %a, %I:%M %P" mail.ui.dateformat.explicit.default: "%Y/%m/%d at %H:%M"
I agree. I'm currently using Windows 10, updated to last version, and Thunderbird 60. Unfortunately Thunderbird 60 is not displaying time format as defined in Windows' system preferences. I've set Italian locale in Windows (dd/mm/yyyy) but Thunderbird is displaying US locale (mm/dd/yyyy) and this is quite annoying. Managing date format with a string in about:config would be very useful.
To use the os settings, set intl.regional_prefs.use_os_locales true. (There's also UI). I thought we set that pref to false for thunderbird by default. But that doesn't appear to be the case. I'll file a bug for it.
(In reply to Magnus Melin from comment #9) > To use the os settings, set intl.regional_prefs.use_os_locales true. > (There's also UI). > > I thought we set that pref to false for thunderbird by default. But that > doesn't appear to be the case. I'll file a bug for it. Thanks, that fixed the problem. Probably this param was set to false by the updater during the last update.
It's a new pref. There were *a lot* of platform changes to how time/date formatting works from 52->60. Filed bug 1482373.

I would so like to see some traction on this, particularly since the "Super Date Format" extension can't be made into a webExtension.

For me, this is a real estate problem on smaller screens. Right now, my Date column is as wide as my Correspondents column which is ridiculous. I really don't need to know that a message sent 3 months ago arrived at 14.36. That granularity just doesn't matter in most cases.

Currently, (by editing about:config)

  1. If email is from "today", it just gives the time. Great. You don't have to put the date because it's obvious. Well done.
  2. If the email is from the past week, I get the form "Day ti.me". Once again, awesome. Short and sweet, just the needed info displayed.
  3. If the email is more than a week old, I get "DD/MM/YYYY HH.MM" which expands the column 7 more characters out with extraneous information. (10 more if there is an am/pm) If I shrink down the column to cover the time, which then puts in ellipses, (grrrr) Thunderbird just undoes my column widths the next time it starts.

Having the ability to display just the date and no time for older messages (case 3) makes the width almost exactly the same as case 2 which makes for a nice neat column. Being able to hover the mouse over the date should give a little popup that shows the complete date/time. This is already the behaviour if the column is shrunk down to ellipses.

I hope this establishes a reasonable use case for this feature.

About the current date format configuration...
(http://kb.mozillazine.org/Change_the_Date_Format)

  • Why are these formats "hidden"?
  • Why isn't there a "date only" (no timestamp) option?
  • Why does it say in the docs "Some operating systems have only one date format...."

Good lord, we're programmers. We are not stuck with (forced into) whatever the OS shoves at us, clearly, since date values 1, 3, and 4 are definitely not system formatted dates. ...ctime(3), strftime(3) et ali are our friends.

Hence, this request for enhancement for custom date/time format.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.