Elementary OS, 0.3.1, 64-bit. The top bar has the date, but I would love to expand the date to read in full, for example, today, "Saturday, September 12, 2015 9:15 AM". I can't see a way to do that. Can someone assist me? Thanks.
2 Answers
It's possible to change date & time format in Wingpanel, but there is no direct UI for this kind of setting.
You can either install and run dconf-editor
, navigate to com -> canonical -> indicator -> datetime, switch custom-time
from locale-default
to custom
and change custom-time-format
into %A, %d %B %Y, %I:%M
.
Or you open your terminal and run the followng two commands:
gsettings set com.canonical.indicator.datetime time-format "custom"
gsettings set com.canonical.indicator.datetime custom-time-format "%A, %d %B %Y, %I:%M"
The changes should take effect immediately in both ways.
There's been an open issue about this for awhile:
https://github.com/elementary/wingpanel-indicator-datetime/issues/57
The answer above does not work. But the following method will work for both the date and time formats.
cd /usr/share/locale/[your language]/LC_MESSAGES
You should see the file datetime-indicator.mo, unless your language is "en". In that case, you will have to copy the file from another locale, like en_GB:
sudo cp ../../en_GB/LC_MESSAGES/datetime-indicator.mo .
Then decompile the .mo file with the command:
sudo msgunfmt datetime-indicator.mo -o datetime-indicator.po
Open datetime-indicator.po in any text editor, and search for the line
msgid "%a, %b %e"
change the msgstr below that line to any format you like. You can include any text and strftime(3) format strings.
If you want to change the time format (for example, to include seconds), look for the line:
msgid "%l:%M %p"
and change the msgstr below that.
Then rebuild the .mo file with the command:
sudo msgfmt datetime-indicator.po -o datetime-indicator.mo
Then log out or reboot.