学Linux - 上红联!
Linux系统教程_红联Linux门户
Linux帮助

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法

时间:2016-04-28来源:linux网站 作者:碧羽宣

升级到了ubuntu16.04系统,时间菜单栏显示两个“月”,在不显示星期时是正常的。如下图:

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法


解决办法是在终端中执行:
gsettings set com.canonical.indicator.datetime time-format 'custom'
gsettings set com.canonical.indicator.datetime custom-time-format '%m月%d日 %A%H:%M:%S'


更具体的参考How to Customize Time & Date Format in Ubuntu Panel:
This quick tutorial is going to show you how to customize your Time & Date indicator in Ubuntu panel, though there are already a few options available in the settings page.

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法

To get started, search for and install dconf Editor in Ubuntu Software Center. Then launch the software and follow below steps:

1. When dconf Editor launches, navigate to com -> canonical -> indicator -> datetime. Set the value of time-format to custom.

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法

You can also do this via a command in terminal:

gsettings set com.canonical.indicator.datetime time-format 'custom'

2. Now you can customize the Time & Date format by editing the value of custom-time-format.

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法

You can also do this via command:

gsettings set com.canonical.indicator.datetime custom-time-format 'FORMAT_VALUE_HERE'

Interpreted sequences are:

%a = abbreviated weekday name
%A = full weekday name
%b = abbreviated month name
%B = full month name
%d = day of month
%l = hour ( 1..12), %I = hour (01..12)
%k = hour ( 1..23), %H = hour (01..23)
%M = minute (00..59)
%p = AM or PM, %P = am or pm.
%S = second (00..59)
open terminal and run command man date to get more details.

Some examples:

custom time format value: %a %H:%M %m/%d/%Y

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法

%a %r %b %d or %a %I:%M:%S %p %b %d

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法

%a %-d %b %l:%M %P %z

在ubuntu16.04下时间菜单栏显示两个“月”的解决办法


本文永久更新地址:http://www.linuxdiyf.com/linux/20182.html

------分隔线------