{{Short description|Information identifying when an event occurred}} {{about||Unix (POSIX) timestamp|Unix time|the documentary film|Timestamp (film)}} {{Use dmy dates|date=May 2022}} {{More sources needed|date=October 2024}} {{multiple image | perrow = 1/1 | image1 = Zeitstempel 01.jpg | image2 = Uhrzeitstempel 05.jpg | footer = An actual time-stamp from around 1960. }} A '''timestamp''' is a sequence of characters or encoded information identifying when a certain event occurred, usually giving the date and time of day, sometimes accurate to a small fraction of a second.<ref>{{Cite web |date=2025-10-01 |title=timestamp |url=https://dictionary.cambridge.org/dictionary/english/timestamp |access-date=2025-10-04 |website=dictionary.cambridge.org |language=en}}</ref> Timestamps do not have to be based on some absolute notion of time, however. They can have any epoch, can be relative to any arbitrary time, such as the power-on time of a system or some arbitrary time in the past.

A distinction is sometimes made between the terms '''datestamp''' ('''DS'''), '''timestamp''' ('''TS''') and '''date-timestamp''' ('''DTS'''): * '''Datestamp''': A date, for example {{CURRENTYEAR}}-{{CURRENTMONTH2}}-{{CURRENTDAY2}} according to ISO 8601 * '''Timestamp''': A time of day, for example {{CURRENTHOUR}}:{{CURRENTMINUTE}}:{{CURRENTSECOND}} (using the 24-hour clock) * '''Date-timestamp''': Date and time, for example {{CURRENTYEAR}}-{{CURRENTMONTH2}}-{{CURRENTDAY2}}T{{CURRENTHOUR}}:{{CURRENTMINUTE}}:{{CURRENTSECOND}} (ISO 8601)

== History == {{No sources section|date=October 2024}} The term "timestamp" derives from rubber stamps used in offices to stamp the current date, and sometimes time, in ink on paper documents, to record when the document was received. Common examples of this type of timestamp are a postmark on a letter or the "in" and "out" times on a time card.

With the advent of digital data systems, the term has expanded to refer to digital date and time information attached to digital data. For example, computer files contain timestamps that indicate when the file was last modified, and digital cameras add timestamps to the pictures they take, recording the date and time the picture was taken.

==Digital timestamps== {{main|Timestamping (computing)}}

Timestamps are usually presented in a consistent format, allowing for easy comparison of multiple records and the tracking progress over time; the practice of recording timestamps in a consistent manner along with the actual data is called ''timestamping''.<ref name="Medeiros2009">{{cite book|author=Claudia Maria Bauzer Medeiros|title=ADVANCED GEOGRAPHIC INFORMATION SYSTEMS -Volume I|url=https://books.google.com/books?id=kBnFDAAAQBAJ&pg=PA59|date=19 September 2009|publisher=EOLSS Publications|isbn=978-1-905839-91-9|pages=59}}</ref>

Timestamps are frequently used for logging events or in a sequence of events (SOE), in which case each event in the log or SOE is marked with a timestamp.

Practically all computer file systems store one or more timestamps in the per-file metadata. In particular, most modern operating systems support the POSIX stat (system call), whereby each file has three timestamps associated with it: time of last access (atime: <code>ls -lu</code>), time of last modification (mtime: <code>ls -l</code>), and time of last status change (ctime: <code>ls -lc</code>).

When some file archivers and version control systems copy a file from a remote computer to the local computer, they adjust the timestamps of the local file to show the date/time in the past when that file was created or modified on the remote computer, rather than the date/time when that file was copied to the local computer.

Timestamps are often found to be "dirty" in many cases.{{clarify|date=February 2026}} Without cleaning up inaccurate timestamps, time-related applications such as provenance analysis or pattern queries are not reliable. To evaluate the correctness of timestamps, temporal constraints can be applied, declaring distance limits between timestamps.<ref>{{Cite journal |last1=Song |first1=Shaoxu |last2=Huang |first2=Ruihong |last3=Cao |first3=Yue |last4=Wang |first4=Jianmin |date=May 2021 |title=Cleaning timestamps with temporal constraints |url=https://link.springer.com/10.1007/s00778-020-00641-6 |journal=The VLDB Journal |language=en |volume=30 |issue=3 |pages=425–446 |doi=10.1007/s00778-020-00641-6 |s2cid=7559769 |issn=1066-8888|url-access=subscription }}</ref>

==Standardization== ISO 8601 standardizes the representation of dates and times.<ref>{{cite web |url=http://dotat.at/tmp/ISO_8601-2004_E.pdf |title=ISO 8601:2004(E) |access-date=2010-03-07 |date=2004-12-01 |publisher=ISO |quote=3.5 Expansion … By mutual agreement of the partners in information interchange, it is permitted to expand the component identifying the calendar year, which is otherwise limited to four digits. This enables reference to dates and times in calendar years outside the range supported by complete representations, i.e. before the start of the year [0000] or after the end of the year [9999].}}</ref> These standard representations are often used to construct timestamp values.

== Examples == {{Unreferenced section|date=October 2024}} Examples of date-timestamps: * Thurs 12/31/2009 1:35 p.m. — mixed-endian date, big-endian 12-hour clock * Thurs 31.12.2009 13:35 — same time as the above, different format with little-endian date and big-endian 24-hour clock * 2005-10-30 T 10:45 UTCISO 8601 international order (big-endian) with time zone) * 2007-11-09 T 11:20 UTC — same format as the above, hence easy to compare and perform alphanumeric sorting * Sat Jul 23 02:16:57 2005 * 2009-10-31T01:48:52Z — ISO 8601 * 2009-10-31 01:48:52Z — "Internet time" per RFC 3339, based on ISO 8601 * 1256953732 — Unix time, equivalent to 2009-10-31 T 01:48:52Z * 1969-07-21 T 02:56 UTC * 07:38, 11 December 2012 (UTC) * 1985-102 T 10:15 UTC — year 1985, day number 102, ''i.e.'', 1985 April 12 * 1985-W15-5 T 10:15 UTC — year 1985, week number 15, weekday 5 = 1985 April 12 * 20180203073000 — used in Wayback Machine memento URLs, equals 3 February 2018 07:30:00

Examples of datestamps: * 2025-05-25 — ISO 8601 international representation of 2025 May 25

Examples of timestamps: * 17:30:23 — time of day in an afternoon * 123478382 ns — the number of nanoseconds since boot * 17 minutes — an arbitrary minute counter that increments every 1 minute since its last manual "reset" event

Sequence number: * 21 — a unitless counter that indicates only the relative order of events; this is event #21, which comes after 20 and before 22

==See also== {{Wiktionary}} {{Commons category|Timestamps}} * Advanced electronic signature * Backdating and forward dating, signing a document with a timestamp (sometimes legitimately) representing a point in time either forwards or backwards * Bates numbering * Decentralized trusted timestamping on the blockchain * Sequence number, consecutive number in a sequence of numbers, for example used in sorting * Linked timestamping * Timestamping (computing) * Timestamp-based concurrency control * Trusted timestamping

==References== {{Reflist}}

{{Authority control}}

Category:Time