Archives For November 30, 1999

gnome shell

This quick tutorial shows how to change the time and date clock format in Ubuntu 18.04’s default Gnome desktop panel.

Since Ubuntu switched to Gnome 3 desktop, you can no longer use dconf editor to customize clock format. Instead, a Gnome Shell extension can do the job.

1. Open Ubuntu Software, search for and install Clock Override extension.

2. Once installed, either launch the settings from install page, or use Gnome Tweaks -> Extensions.

3. When the settigns page opens, type in the box to change the time format.

Here are some codes:

  • %a = abbreviated weekday name
  • %A = full weekday name
  • %b = abbreviated month name
  • %B = full month name
  • %d = day of month
  • %H = hour (00..23)
  • %M = minute (00..59)
  • %p = AM or PM, %P = am or pm.
  • %S = second (00..59)

For a full list of code, run man date in terminal:

Time & Date format

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.

custom-timedate

This does no longer work for Ubuntu 18.04 and higher as they switched to Gnome Desktop, see this tutorial instead.

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.

custom time format

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.

customize-timeformat

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

exam-1

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

exam-2

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

exam-3