Linux default date & time format
mouse 248 · person cloud · link
Last update
2024-03-04
2024
03-04
« — »
  1. find your current locale
1
2
locale | grep LC_TIME
# => LC_TIME="en_US.UTF-8"
  1. edit the corresponding file /usr/share/i18n/locales/en_US

  2. change values to your liking:

1
2
3
4
d_t_fmt "%a %d %b %Y %T %Z"
d_fmt   "%Y//%m//%d"
t_fmt   "%T"
date_fmt "%a %d %b %Y %T %Z"
  1. regenerate locales and re-login
1
2
locale-gen
update-locale

Source: linuxopsys