Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

66%
+2 −0
Q&A How to set the default time format in Linux Debian.

You can define the LC_TIME environment variable. In ~/.profile if you start you session in a login shell or else ~/.bashrc, put export LC_TIME=ru_RU.UTF-8 For example, % LC_TIME=ru_RU.UTF-8 da...

posted 7mo ago by Quasímodo‭  ·  edited 7mo ago by Quasímodo‭

Answer
#2: Post edited by user avatar Quasímodo‭ · 2023-10-07T11:43:51Z (7 months ago)
  • You can define the `LC_TIME` environment variable. E.g.,
  • LC_TIME=ru_RU.UTF-8 date
  • will make the output format be in Russian, _as long as you already have that locale enabled (or, better said, generated)_, which you can check with `locale -a`.
  • If it is not generated yet, find the corresponding line in `/etc/locale.gen`, remove the `#` from it and run `locale-gen`.
  • All the environment variables heeded by [`date` are found in the POSIX specification](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html).
  • ---
  • In a desktop environment, there might be a corresponding option in the localization settings.
  • You can define the `LC_TIME` environment variable. In `~/.profile` if you start you session in a login shell or else `~/.bashrc`, put
  • export LC_TIME=ru_RU.UTF-8
  • For example,
  • % LC_TIME=ru_RU.UTF-8 date
  • Сб 07 окт 2023 13:39:21 CEST
  • will make the output format be in Russian,
  • That only works if you already have that locale enabled (or, better said, generated), which you can check with `locale -a`. If it is not generated yet, find the corresponding line in `/etc/locale.gen`, remove the `#` from it and run `locale-gen`.
  • In a desktop environment, there might be a corresponding option in the localization settings.
  • All the environment variables heeded by [`date` specifically are found in the POSIX specification](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html).
  • And the [locale section](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_05) lists the variable in more details, as well as which other functions must respect it.
  • There is an expectation, but not a guarantee, that time related programs and functions will respect that variable.
#1: Initial revision by user avatar Quasímodo‭ · 2023-10-07T11:29:14Z (7 months ago)
You can define the `LC_TIME` environment variable. E.g.,

    LC_TIME=ru_RU.UTF-8 date

will make the output format be in Russian, _as long as you already have that locale enabled (or, better said, generated)_, which you can check with `locale -a`.

If it is not generated yet, find the corresponding line in `/etc/locale.gen`, remove the `#` from it and run `locale-gen`.

All the environment variables heeded by [`date` are found in the POSIX specification](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html).

---

In a desktop environment, there might be a corresponding option in the localization settings.