English
[command]#date# [option]`--set` _YYYY-MM-DD_
[command]#date# [option]`--utc`
[command]#hwclock#
[command]#hwclock --hctosys#
[command]#hwclock --set --date _"dd mmm yyyy HH:MM"_pass:attributes[{blank}]#
[command]#hwclock --systohc#
[command]#timedatectl#
[command]#timedatectl# [option]`list-timezones`
[command]#timedatectl# [option]`set-local-rtc` _boolean_
[command]#timedatectl# [option]`set-ntp` _boolean_
[command]#timedatectl# [option]`set-time` _HH:MM:SS_
[command]#timedatectl# [option]`set-time` _YYYY-MM-DD_
Commonly Used Control Sequences
Configuring the Date and Time
|Control Sequence|Description
|[option]`%H`|The hour in the _HH_ format (for example, `17`).
|[option]`%M`|The minute in the _MM_ format (for example, `30`).
|[option]`%S`|The second in the _SS_ format (for example, `24`).
|[option]`%d`|The day of the month in the _DD_ format (for example, `16`).
|[option]`%m`|The month in the _MM_ format (for example, `09`).
|[option]`%Y`|The year in the _YYYY_ format (for example, `2013`).
|`%Z`|The time zone abbreviation (for example, `CEST`).
|[option]`%F`|The full date in the _YYYY-MM-DD_ format (for example, `2013-09-16`). This option is equal to [option]`%Y-%m-%d`.
|[option]`%T`|The full time in the _HH:MM:SS_ format (for example, 17:30:24). This option is equal to [option]`%H:%M:%S`
`date`(1) — The manual page for the [command]#date# command provides a complete list of supported command line options.
date +"format"
Displaying the Current Date and Time
Either you can set the hardware clock to the current system time by using this command:
For details about NTP, see xref:../servers/Configuring_NTP_Using_the_chrony_Suite.adoc#ch-Configuring_NTP_Using_the_chrony_Suite[Configuring NTP Using the chrony Suite] and xref:../servers/Configuring_NTP_Using_ntpd.adoc#ch-Configuring_NTP_Using_ntpd[Configuring NTP Using ntpd]. For information about PTP, see xref:../servers/Configuring_PTP_Using_ptp4l.adoc#ch-Configuring_PTP_Using_ptp4l[Configuring PTP Using ptp4l]. For information about setting the hardware clock after executing [application]*ntpdate*, see xref:../servers/Configuring_NTP_Using_ntpd.adoc#s1-Configuring_the_Hardware_Clock_update[Configuring the Hardware Clock Update].