English
You can synchronize the hardware clock and the current system time in both directions.
You can also customize the format of the displayed information by providing the [option]`+"pass:attributes[{blank}]_format_pass:attributes[{blank}]"` option on the command line:
xref:System_Locale_and_Keyboard_Configuration.adoc#ch-System_Locale_and_Keyboard_Configuration[System Locale and Keyboard Configuration] documents how to configure the keyboard layout.
When you synchronize the hardware clock and the system time, you can also specify whether you want to keep the hardware clock in local time or UTC by adding the [option]`--utc` or [option]`--localtime` option. Similarly to using [option]`--set`, `UTC` or `LOCAL` is recorded in the `/etc/adjtime` file.
When you need to change the hardware clock date and time, you can do so by appending the [option]`--set` and [option]`--date` options along with your specification:
Using the timedatectl Command
Using the hwclock Command
Using the date Command
To set the hardware clock to the current system time and keep the hardware clock in local time, run the following command as `root`:
To list all available time zones, type the following at a shell prompt:
To identify which time zone is closest to your present location, use the [command]#timedatectl# command with the [option]`list-timezones` command line option. For example, to list all available time zones in Europe, type:
To enable your system to synchronize the system clock with a remote `NTP` server, replace _boolean_ with `yes` (the default option). To disable this feature, replace _boolean_ with `no`.
To enable automatic synchronization of the system clock with a remote server, type:
To display the current date and time, run the [command]#date# command with no additional command line options:
To display the current date and time in UTC, type the following at a shell prompt:
To display the current date and time along with detailed information about the configuration of the system and hardware clock, run the [command]#timedatectl# command with no additional command line options:
To display the current date and the current local time from the hardware clock, run as `root`:
To display the current date and local time, type the following at a shell prompt:
To customize the output of the [command]#date# command, type:
To configure your system to maintain the clock in the local time, replace _boolean_ with `yes` (or, alternatively, `y`, `true`, `t`, or `1`). To configure the system to use UTC, replace _boolean_ with `no` (or, alternatively, `n`, `false`, `f`, or `0`). The default option is `no`.