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
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...
Answer
#2: Post edited
You can define the `LC_TIME` environment variable. E.g.,LC_TIME=ru_RU.UTF-8 datewill 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
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.