搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

How can I change date and time locale?

  • 2 回覆
  • 1 有這個問題
  • 14 次檢視
  • 最近回覆由 cor-el

more options

toLocaleDateString and toLocaleTimeString return date in "%m/%d/%Y" and "%I:%M:%S %p" formats, while I want them to use "%Y-%m-%d" and "%H:%M:%S" formats. What settings/environment variables should I change?

OS: Mint 19 tara Kernel: x86_64 Linux 4.15.0-20-generic Mozilla Firefox 63.0.3

`/usr/bin/locale' outputs: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" LC_NUMERIC=ru_RU.UTF-8 LC_TIME=C LC_COLLATE="en_US.UTF-8" LC_MONETARY=ru_RU.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=ru_RU.UTF-8 LC_NAME=ru_RU.UTF-8 LC_ADDRESS=ru_RU.UTF-8 LC_TELEPHONE=ru_RU.UTF-8 LC_MEASUREMENT=ru_RU.UTF-8 LC_IDENTIFICATION=ru_RU.UTF-8 LC_ALL=

toLocaleDateString and toLocaleTimeString return date in "%m/%d/%Y" and "%I:%M:%S %p" formats, while I want them to use "%Y-%m-%d" and "%H:%M:%S" formats. What settings/environment variables should I change? OS: Mint 19 tara Kernel: x86_64 Linux 4.15.0-20-generic Mozilla Firefox 63.0.3 `/usr/bin/locale' outputs: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" LC_NUMERIC=ru_RU.UTF-8 LC_TIME=C LC_COLLATE="en_US.UTF-8" LC_MONETARY=ru_RU.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=ru_RU.UTF-8 LC_NAME=ru_RU.UTF-8 LC_ADDRESS=ru_RU.UTF-8 LC_TELEPHONE=ru_RU.UTF-8 LC_MEASUREMENT=ru_RU.UTF-8 LC_IDENTIFICATION=ru_RU.UTF-8 LC_ALL=

所有回覆 (2)

more options

I think the time and date is base on you O/S.

more options