Date and Time

Configure the system date, time zone and automatic time synchronization in MocaccinoOS using timedatectl.

Date and Time Configuration

MocaccinoOS uses systemd to manage the system clock, date, time zone and network time synchronization.

The timedatectl command provides a convenient way to configure and manage these settings.

Checking the current date and time

To display the current system time, time zone and synchronization status, run:

1
$ timedatectl

The output includes:

  • Local time
  • Universal Coordinated Time (UTC)
  • Hardware Real-Time Clock (RTC)
  • Configured time zone
  • System clock synchronization status
  • Network Time Protocol (NTP) status

Configuring the time zone

To list all available time zones:

1
$ timedatectl list-timezones

You can also filter the list. For example:

1
$ timedatectl list-timezones | grep Europe

To configure the time zone, use set-timezone.

For example, to configure the Netherlands:

1
$ sudo timedatectl set-timezone Europe/Amsterdam

You can verify the configuration by running:

1
$ timedatectl

Enabling automatic time synchronization (NTP)

It is recommended to enable network time synchronization so that your system clock stays accurate automatically.

To enable NTP synchronization:

1
$ sudo timedatectl set-ntp true

This enables and starts the first available network time synchronization service.

To check the synchronization status:

1
$ timedatectl

You can also check the status of the time synchronization service:

1
$ timedatectl timesync-status

The latter command provides additional information when systemd-timesyncd is being used.

To disable automatic time synchronization:

1
$ sudo timedatectl set-ntp false

Manually setting the system date and time

If you need to configure the system clock manually, first disable automatic time synchronization:

1
$ sudo timedatectl set-ntp false

You can then set the date and time using the following format:

1
$ sudo timedatectl set-time "2026-11-29 14:30:00"

The format is:

1
YYYY-MM-DD HH:MM:SS

Once configured, you can verify the new date and time:

1
$ timedatectl

If you want to resume automatic synchronization afterwards:

1
$ sudo timedatectl set-ntp true

Hardware clock (RTC)

The hardware clock, also known as the Real-Time Clock (RTC), is usually located on the motherboard. It keeps track of time even when the computer is powered off.

Linux systems generally use UTC for the hardware clock and apply the configured time zone when displaying local time.

This is the recommended configuration and is also the default for most Linux installations.

To check the hardware clock configuration:

1
$ timedatectl

Look for the RTC in local TZ entry. Ideally, it should report:

1
RTC in local TZ: no

To configure the hardware clock to use UTC:

1
$ sudo timedatectl set-local-rtc 0

Using UTC avoids problems with time zone changes and daylight saving time.

Note: Using local time for the hardware clock is generally discouraged. It may be necessary in certain dual-boot configurations, particularly when another operating system expects the hardware clock to use local time.

Additional information

For more information about timedatectl, consult its manual page:

1
$ man timedatectl

You can also consult the following resources:

Last modified November 29, 2026: Update SFTP (f553589)