Opened 8 months ago

Last modified 8 months ago

#21921 new defect

Tor Messenger unable to change date/time format in chat

Reported by: cypherpunks Owned by:
Priority: Medium Milestone:
Component: Applications/Tor Messenger Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

  • Tor Messenger Version: "0.4.0b2 (based on Instantbird 1.6a1pre)"
  • Platform: linux x64

# Expected behavior:

Set ISO date format in chat display. Date %Y-%m-%d, time %H:%M:%S. NO "AM"/"PM"!

# Actual behavior:

American-style date/time with AM/PM, etc. See attached screenshot. Note, screenshot is of view in settings; but it is consistent with what is seen in an actual chat (private, will not screenshot!).

# Attempted fixes:

  • Customize system date/time format, with distro-provided luser GUI.
  • Set environment $LC_ALL and $LC_TIME to en_DK, en_DK.UTF-8
  • localectl set-locale LANG=en_DK.UTF-8
  • gsettings set org.gnome.system.locale region en_DK.UTF-8
  • Mash random stuff in Tor Messenger's about:config style widget (probably broke something)
  • LC_ALL=en_DK.utf8 ./start-tor-messenger.desktop --UILocale en_DK.utf8
  • Try all of the above with both en_DK.UTF-8 and en_DK.utf8, because:

user@host:~/tor-messenger$ locale -a | grep en_DK
en_DK
en_DK.iso885915
en_DK.utf8

  • Ask $SEARCH_ENGINE for help.
  • tar -xf a fresh tor-messenger, with empty profile, after all the above.
  • Punch mattress, scream curse words into pillow.
  • Get lobotomy to make me like AM/PM (still did not take; NO ME GUSTA).

Note: Setting this kind of thing on Linux is somehow always a mess. Please either respect $LC_ALL, $LC_TIME, etc., or at least grow a kludgey about:config setting which takes a strftime(3) format string. Thanks.

Child Tickets

Attachments (1)

tor-messenger-am-pm.png (24.8 KB) - added by cypherpunks 8 months ago.
Screenshot of Tools -> Preferences -> Themes

Download all attachments as: .zip

Change History (2)

Changed 8 months ago by cypherpunks

Attachment: tor-messenger-am-pm.png added

Screenshot of Tools -> Preferences -> Themes

comment:1 Changed 8 months ago by arlolra

Sorry for the pain.

Looking at this briefly, the template is hardcoded in,
https://github.com/mozilla/releases-comm-central/blob/master/im/themes/messages/simple/Status.html

And it gets filled by date.toLocaleTimeString(),
https://github.com/mozilla/releases-comm-central/blob/master/chat/modules/imThemes.jsm#L360-L365
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString

There're probably a few configs preventing this from getting set from the system, such as,

intl.locale.matchOS;false
javascript.use_us_english_locale;true
privacy.use_utc_timezone;false

but that's still to be investigated.

Note: See TracTickets for help on using tickets.