In a support thread about Discourse’s date/time tool, MichelleBasey reports confusion around the \T\Z token in date formatting, noting that zz actually delivers the intended timezone display — a detail not clearly documented. Benjamin_D clarifies that \T\Z was a typo or misdocumented escape sequence, and that zz/Z are still functional via moment-timezone, though not deprecated. j.jaffeux confirms the \T\Z token was intentionally removed for standardization, but acknowledges the oversight in documentation and locale files. He explains \T\Z was meant to display city-based timezones, but required escaping to avoid moment.js misinterpreting Z. Further, j.jaffeux notes timezone formatting doesn’t work in calendar mode (e.g., “yesterday”) and must be disabled via calendar="false". Benjamin_D also highlights issues with locale-specific quotation marks (e.g., French) interfering with formatting. The thread ends with a lighthearted GIF from Benjamin_D on try.discourse. The core issue was documentation clarity, not a bug — and fixes are underway.
editor window
open calendar tool using button above
Advanced Mode
instructions say to use \T\Z to display the time zone
here’s what actually happens:
LLLL \T\Z gives you:
Tuesday, August 25, 1987 1:00 AM TZ
LLLL TZ gives you:
Tuesday, August 25, 1987 1:00 AM T+00:00
LLLL ZZ gives you:
Tuesday, August 25, 1987 1:00 AM +0000
LLLL zz gives you what the text implied you were trying to do:
Tuesday, August 25, 1987 1:00 AM Coordinated Universal Time
(which I figured out by clicking the help icon and scrolling through a complex nerd document not meant for typical end users, don’t get me wrong, I love nerd documents!)
I don’t know if there’s a bug or if it’s just a clarity in the text thing. But as an end user, telling me about zz on the calendar screen would have been super useful.
z and zz seem to be deprecated, work only if a timezone is specified (so here it should work ) . But you are right, \T\Z seems a typo, not sure why the \ and maybe a space between T and Z or no T?
if I understand correctly, the date is always displayed according to the timezone of the user setting https://your.domain/u/my/preferences/profile
hovering shows the timezones of the system https://your.domain/admin/site_settings/category/all_results?filter=timezone
Let me explain you more in details what are the reasons for what you had before. It’s true that zz and Z are similar to what you want to achieve, but TZ was a special token I added which would allow to show the timezone using a city name, which I think is clearer for some users not well versed in timezones.
The format was \T\Z and not TZ because it’s a special token and needed to be escaped so moment doesn’t try to replace the Z (this is what you see in your second example where you do LLLL TZ and you end up with T+01:00).
I decided few months ago to remove this to avoid having to support non standard things, but I guess I missed this occurrence as it was escaped two times in locale file: \\T\\Z which I probably fail to grep using single escaped query.
And finally, zz and Z are not deprecated, they have been removed from core moment, but are still very present in moment-timezone, so you can use them safely