Use it to check or set the time, or when time jumps after reboot.
Date / Time
date shows or sets the system time; timedatectl shows time, time zone, RTC and whether NTP sync is active. hwclock reads and writes the hardware clock.
1. timedatectl — local, UTC and RTC times.
2. NTP active? If not, enable: timedatectl set-ntp true.
3. Manual set only without NTP: timedatectl set-time 'YYYY-MM-DD hh:mm:ss'.
4. After reboot wrong → hwclock --systohc and check the RTC battery.
5. Compare with another host: date -u.
system clock (kernel) ← NTP adjustments → written to RTC → read from RTC at boot
For Time & NTP → Date / Time, continue with the first unproven Topic check: Record local time with numeric UTC offset, UTC time, uptime/monotonic context and boot time for the incident. If that boundary is healthy, advance to the adjacent check: Inspect synchronization state plus RTC/local-RTC configuration and virtualization clock source assumptions before manual intervention. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
clocksource/RTC → kernel timekeeping → system wall clock → UTC/local presentation → synchronization correction → application timestamp/timer use → workload
Healthy evidence: wall clock, UTC conversion and monotonic progression are coherent, RTC/virtualization assumptions are known, corrections are stable and the time-sensitive workload succeeds.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Record local time with numeric UTC offset, UTC time, uptime/monotonic context and boot time for the incident.
- Inspect synchronization state plus RTC/local-RTC configuration and virtualization clock source assumptions before manual intervention.
- Search logs for time jumps, suspend/resume, boot, migration and synchronization corrections; correlate application timestamps explicitly.
- After correction, verify stable progression over time and repeat the original time-sensitive operation rather than checking only one displayed timestamp.
Verification chain. clocksource/RTC → kernel timekeeping → system wall clock → UTC/local presentation → synchronization correction → application timestamp/timer use → workload
Step 3 Commands Verify boundary
date
date -u
date -d '2026-11-03 10:00 UTC' +%s
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: time jumps, repeated manual corrections, wrong RTC mode, guest/host clock fights, apparent local-time error with correct UTC, or application timers disagree after a clock step.
Step 5 Common mistakes Narrow the fault
- Comparing logs from hosts in different time zones without UTC.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Do not set the time by hand while NTP is active — it will be corrected. Time jumping after reboot means a bad RTC or an RTC set in local time; write the synchronised time with hwclock --systohc.
timedatectl— time, time zone and sync statuschronyc tracking— offset and source (chrony)chronyc sources -v— time sources and reachabilitydate -u— UTC time
ReferenceWhat it is1 section · depth on demand
Core model
Capture current wall-clock with explicit offset/zone plus UTC and monotonic/uptime context. Determine whether the symptom concerns displayed local time, actual system-clock error or elapsed-time measurement. Check RTC/virtualization relationships and recent clock-change events before manually setting time, because a step can affect schedulers, logs, leases, TLS/Kerberos and application timers.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Date/time correctness is confirmed only for a defined clock basis and interval; one correct display does not show source health, historical correctness or application behavior.
In depth
Setting and displaying date and time
On systems with network time synchronisation, the clock is normally never set by hand. The timedatectl(1) manual page describes set-time, which sets both the system clock and the RTC, and set-ntp, which turns synchronisation on or off. Setting the time manually only makes sense with NTP turned off, for example on isolated systems, or in a lab to test date-dependent behaviour.
Displaying time
| Command | Output |
|---|---|
date | Local time in the default format |
date -u | UTC |
date -Is / date --iso-8601=seconds | 2026-11-28T14:40:02+01:00 |
date +%s | Seconds since 1970-01-01 UTC (epoch) |
date -d @1795873202 | Convert an epoch value |
date -d "next friday 09:00" | Relative dates |
TZ=America/New_York date | Time in another zone |
Format codes
| Code | Meaning | Code | Meaning |
|---|---|---|---|
%F | 2026-11-28 | %T | 14:40:02 |
%Y%m%d | 20261128 | %H%M | 1440 |
%z | +0100 | %Z | CET |
%s | Epoch | %u | Day of week (1 = Monday) |
Clocks in the system
| Clock | Notes |
|---|---|
| System clock (realtime) | What date shows; can be stepped |
| Monotonic clock | Never jumps; used for timeouts and timers |
| Hardware clock (RTC) | Battery-backed; read at boot (hwclock) |
Changing the clock manually
| Step | Command |
|---|---|
| Disable NTP | timedatectl set-ntp false |
| Set the time | timedatectl set-time "2026-11-28 14:45:00" |
| Re-enable NTP | timedatectl set-ntp true |
host$ date -Is; date -u +%FT%TZ
2026-11-28T14:40:02+01:00
2026-11-28T13:40:02Z
host$ date +%s
1795873202
host$ date -d @1795873202 -u
Sat Nov 28 13:40:02 UTC 2026
host$ backup="db-$(date +%F_%H%M).sql.gz"; echo "$backup"
db-2026-11-28_1440.sql.gz
host$ date -d "2026-11-28 14:00 CET + 90 minutes" +%T
15:30:00
host$ sudo timedatectl set-ntp false && sudo timedatectl set-time "2026-12-31 23:59:00" && sudo timedatectl set-ntp true
Time stamps in file names and logs
%F_%H%M sorts correctly as text, and contains no characters that cause trouble in file names. In logs and APIs, ISO 8601 with an offset (date -Is), or UTC with Z, removes any doubt about the time zone.
Documented example, not captured output.
How it works at runtime
Date / Time is part of Time & NTP → Date / Time. Date / Time covers the Linux system clock as observed in UTC/local presentation, the distinction between wall-clock and monotonic time, RTC interaction and the operational consequences of stepping or slewing the clock.
Topic-specific state model. Date / Time covers the Linux system clock as observed in UTC/local presentation, the distinction between wall-clock and monotonic time, RTC interaction and the operational consequences of stepping or slewing the clock.
Interpretation rule. - date looks correct ≠ the clock source or synchronization discipline is healthy.
- Wall-clock time ≠ monotonic elapsed time; wall time can step while monotonic clocks normally do not.
- Manual
datechange fixes display ≠ underlying NTP/RTC/VM clock conflict is resolved. - RTC time ≠ necessarily local time; Linux commonly treats hardware clock as UTC and converts presentation separately.
Quick reference
Date and time commands:
date; date -u; date -Iseconds
date +%s # epoch seconds
date -d @1793923200 # epoch → date
date -d 'next monday 09:00'
date -d '2026-11-05 12:00 UTC' +'%F %T %Z'
timedatectl set-time '2026-11-05 12:00:00' # only with NTP disabled
Use ISO 8601 and UTC in logs and scripts (date -u +%FT%TZ); local time with DST changes creates ambiguous or missing hours.
Limits and how it fails
Primary failure point. Date/time correctness is confirmed only for a defined clock basis and interval; one correct display does not show source health, historical correctness or application behavior.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Date / Time owns Linux system-clock and wall/monotonic distinctions. Time Zones owns presentation rules; NTP/chrony own network discipline; hardware/virtualization owns underlying clock devices.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Time & NTP → Date / Time. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://chrony-project.org/documentation.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Date / Time operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Date / Time.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Date / Time covers the Linux system clock as observed in UTC/local presentation, the distinction between wall-clock and monotonic time, RTC interaction and the operational consequences of stepping or slewing the clock. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact symptom + clock/trigger time → identify authoritative scheduler or time daemon → read back effective configuration/runtime state → reproduce or observe the expected event/source measurement → correlate identity/environment/offset/status with logs → change one demonstrated cause → read back stable state → repeat original scheduled or time-sensitive workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | clocksource/RTC → kernel timekeeping → system wall clock → UTC/local presentation → synchronization correction → application timestamp/timer use → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Date/time correctness is proven only for a defined clock basis and interval; one correct display does not prove source health, historical correctness or application behavior. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux scheduling/time evidence can establish this proof path: clocksource/RTC → kernel timekeeping → system wall clock → UTC/local presentation → synchronization correction → application timestamp/timer use → workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host, clock/timezone, scheduler or time-daemon instance, identity/environment, source, trigger/measurement interval or workload scope. Date/time correctness is proven only for a defined clock basis and interval; one correct display does not prove source health, historical correctness or application behavior. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven scheduling/time boundary: preserve the original timing and execution/source context, capture the adjacent scheduler/process or clock/source state, change only the demonstrated cause, then repeat the original scheduled or time-sensitive workload and regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
Date / Time · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Date / Time |
|---|---|
| Topic path | Time & NTP → Date / Time |
| Runtime state | Date / Time covers the Linux system clock as observed in UTC/local presentation, the distinction between wall-clock and monotonic time, RTC interaction and the operational consequences of stepping or slewing the clock. |
| Fast checks | - Record local time with numeric UTC offset, UTC time, uptime/monotonic context and boot time for the incident. - Inspect synchronization state plus RTC/local-RTC configuration and virtualization clock source assumptions before manual intervention. - Search logs for time jumps, suspend/resume, boot, migration and synchronization corrections; correlate application timestamps explicitly. - After correction, verify stable progression over time and repeat the original time-sensitive operation rather than checking only one displayed timestamp. |
| Verification chain | clocksource/RTC → kernel timekeeping → system wall clock → UTC/local presentation → synchronization correction → application timestamp/timer use → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Date/time correctness is proven only for a defined clock basis and interval; one correct display does not prove source health, historical correctness or application behavior. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |