Home

Timestamps

A timestamp is a representation of a specific moment in time, typically consisting of a date and a time of day, and often including a time zone or offset from Coordinated Universal Time (UTC). Timestamps are used to record when events occur, to order events, and to provide provenance for data, logs, and documents. The precision of a timestamp can range from seconds to milliseconds, microseconds, or finer depending on the system.

Common standards and formats include ISO 8601, which expresses date and time in a readable form such

Time zone handling is a key consideration; converting between local time and UTC can affect interpretation

as
2024-11-30T14:22:10Z
or
2024-11-30T14:22:10+02:00;
and
RFC
3339,
a
profile
of
ISO
8601
used
by
many
internet
protocols.
The
Unix
time
or
epoch
timestamp
counts
the
number
of
seconds
(or
milliseconds)
elapsed
since
January
1,
1970
UTC.
Databases
may
store
timestamps
using
types
such
as
TIMESTAMP
WITHOUT
TIME
ZONE
or
TIMESTAMP
WITH
TIME
ZONE,
and
many
programming
languages
provide
utilities
to
parse
and
format
timestamps.
and
comparisons.
Clock
synchronization
using
NTP
helps
ensure
consistency
across
systems.
In
distributed
systems,
logical
timestamps
such
as
Lamport
clocks
are
sometimes
used
to
order
events
when
physical
clocks
are
not
synchronized.
Timestamps
are
essential
in
logging,
data
management,
version
control,
financial
records,
and
any
domain
that
requires
tracking
the
timing
of
actions.