Timeline for How can I change the default date format (using LC_TIME)?
Current License: CC BY-SA 4.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 12, 2023 at 20:27 | answer | added | Joe | timeline score: 0 | |
| Mar 18, 2019 at 4:48 | vote | accept | Gowtham | ||
| Aug 13, 2018 at 7:12 | history | edited | Gowtham | CC BY-SA 4.0 |
updated en_US locales file LC_TIME section
|
| Aug 13, 2018 at 6:28 | answer | added | muru | timeline score: 2 | |
| Aug 13, 2018 at 5:19 | history | edited | muru | CC BY-SA 4.0 |
added 1 character in body; edited tags; edited title
|
| Aug 13, 2018 at 5:13 | history | edited | Gowtham | CC BY-SA 4.0 |
locale and en_US output
|
| Aug 11, 2018 at 15:20 | comment | added | Gowtham |
But date gives Thu Aug 9 18:26:11 IST 2018 ... Which is different from LC_TIME d_t_fmt format defined in en_IN.. ..
|
|
| Aug 10, 2018 at 18:14 | comment | added | waltinator |
The dt_t_fmt looked like Unicoded ASCII, so I decoded it. It is %A %d %B %Y %I:%M:%S %p %Z date "+%A %d %B %Y %I:%M:%S %p %Z" --date=yesterday (today is the 10th) gives Thursday 09 August 2018 02:12:57 PM EDT
|
|
| Aug 10, 2018 at 14:56 | comment | added | Gowtham | @danzel yes I can do it.. but the thing is.. I have few 3rd party libraries relied upon date output. Currently it's expecting format with %d.. | |
| Aug 10, 2018 at 14:51 | comment | added | danzel |
@Goron I'm not sure what you want to achieve. Why don't you just use a custom format string like date +"%a %b %d %T %Z %Y"?
|
|
| Aug 10, 2018 at 14:37 | comment | added | Gowtham | @danzel do you have the solution?.. | |
| Aug 10, 2018 at 14:35 | comment | added | danzel |
@waltinator date is indeed influenced by LC_TIME. date's texinfo also explicitly recommends to set LC_TIME to C in order to produce locale independent output.
|
|
| Aug 10, 2018 at 13:32 | comment | added | waltinator |
SInce strings $(type -p date) | grep LC shows no output, it is clear that date is not influenced by LC_TIME. You cannot "Change Default Date format using LC_TIME"
|
|
| Aug 10, 2018 at 13:10 | review | First posts | |||
| Aug 10, 2018 at 13:21 | |||||
| Aug 10, 2018 at 13:04 | history | asked | Gowtham | CC BY-SA 4.0 |