在Ubuntu中更改短日期格式

che*_*kit 8 ubuntu datetime

如何在Ubuntu中更改系统范围的短日期格式?例如,雷鸟表示DD/MM/YY格式日期和我想将其更改为MM/DD/YY或YYYY-MM-DD.

到目前为止我能找到的最好的信息是在这个帖子中:

http://ubuntuforums.org/showthread.php?t=193916

编辑:我想更改系统范围的日期格式,以便我的所有应用程序都使用这种新的日期格式.

Nis*_*shi 6

  • 安装并启动“dconf Editor”,导航至 com -> canonical -> Indicator -> datetime。
  • 将 的值设置time-formatcustom
  • 通过编辑 的值来自定义时间和日期格式custom-time-format,例如将其设置为%Y-%m-%d %H:%M:%S“2017-12-31 23:59:59”格式。
  • 重新登录即可查看更改的效果。

您还可以通过终端中的命令来执行此操作:

gsettings set com.canonical.indicator.datetime time-format 'custom'
gsettings set com.canonical.indicator.datetime custom-time-format '%Y-%m-%d %H:%M:%S'
Run Code Online (Sandbox Code Playgroud)

资料来源:http ://ubuntuhandbook.org/index.php/2015/12/time-date-format-ubuntu-panel/


agn*_*nul 1

Thunderbird 使用系统的日期格式,该格式取决于系统的区域设置。您有两个选择:

  1. 修改系统区域设置,说明位于您上面链接的论坛主题中,或者
  2. 设置LC_TIME为使用您想要的格式的区域设置。Craig H链接的文章表明en_DK