THE GITHTML FIELD GUIDE
Make report timestamps unambiguous with HTML time
Display a human-readable date and time with an explicit time zone, then use time and datetime to provide a machine-readable value. Distinguish the observation time from publication time. HTML does not automatically convert the visible text to the reader's local zone, so never imply that an unexplained timestamp is personalized.
Choose the right representation
A report may describe a measurement collected yesterday but exported today. Those are different facts. Label them separately so a reader can judge the age of the evidence. Avoid numeric dates such as 03/04 when the audience spans date conventions. Spelling out the month removes an ambiguity that markup alone cannot fix.
Apply the pattern deliberately
The datetime attribute should agree with the visible label, including its offset when a time is supplied. Keep a stable, explicit timestamp in the reading copy rather than relying on a script to calculate phrases such as two hours ago. Relative ages become misleading when the document is saved, reopened, or read far from its author.
- Label collection, export, and publication timestamps according to what each one actually records.
- Compare the displayed date, time, and zone with the datetime attribute before sharing.
- Use absolute dates in saved reports and treat relative age labels as optional live enhancements.
<p>Observed: <time datetime="2026-11-23T14:30:00Z">23 November 2026, 14:30 UTC</time>.</p>Audit timestamps as evidence, not decoration
Imagine a report exported in New York after a measurement collected by a server in UTC. The export date may be different from the measurement date even though only minutes passed. Write both events explicitly rather than placing a single unlabeled date under the title. If the data covers an interval, identify the beginning, end, and whether the end is included. A timestamp on the document should not imply that every value was measured at that instant.
The datetime attribute is machine-readable metadata, not a timezone conversion command. A browser will not automatically replace the visible words with a personalized local time. If your export pipeline generates both values, derive them from the same timestamp and compare a known example during testing. Hand-editing the displayed label while leaving the attribute unchanged creates two conflicting accounts of the same event. Avoid timezone abbreviations whose meaning depends on geography when a UTC label or explicit offset is clearer.
A fixed numeric offset can identify an instant, but it does not capture all the rules of a region's future clock changes. For a scheduled operational event, include the responsible region or organization as context and use the project's authoritative scheduling system. For a historical report, preserve the recorded instant. If a relative phrase such as yesterday is useful in a live dashboard, replace or supplement it with an absolute date in the downloadable copy.
Check the finished reading experience
Review timestamps around a date boundary and daylight-saving transition if those situations affect the report. A numeric offset describes that timestamp, while a named region can explain the operational context. Do not silently relabel UTC as local time merely because the browser is running on a particular device.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.