A timestamp is a record of exactly when something happened, written in a form computers can compare.
This guide is for anyone who has seen a strange time in a log, a file or an error message. You do not need technical knowledge. It also suits new IT and security staff who need to line up events from different systems.
In short
- Computers usually store time in UTC, one shared world time, and only show local time to people.
- Many systems count time as seconds since 1 January 1970, called Unix time.
- Sign-in codes, work sign-ins and certificates all check the clock, so a wrong clock can lock people out.
- Logs only tell a true story if every system agrees on the time.
What you will learn
- World clock (UTC)
- one agreed time for the whole planet, with no summer time changes.
- Time label (timestamp)
- a note saying when something happened.
- Clock gap (clock skew)
- how far apart two computers' clocks are.
What is a timestamp?
Think of the postmark on a letter. It shows when the letter entered the post, so anyone can put letters in order later.
A timestamp works the same way. Computers add one to files, emails, messages and log lines, so people and programs can tell what happened first.
The tricky part is that people live in different time zones. Summer time rules are complex and can change, so an internet standard says the best way to agree is to use UTC [1]. Your device then converts UTC to local time for you to read.
Where the comparison stops working: a postmark is stamped by one post office. On a network, every computer stamps its own events with its own clock, and those clocks can disagree.
Keeping clocks in step is the job of a time service. Our guide to Network Time (NTP) for Beginners explains how that works.
Why does it matter?
Many security checks quietly depend on the clock. When time is wrong, things break, or the record of what happened becomes hard to trust.
If you use an authenticator app
What could happen: your sign-in codes keep failing because your phone's clock is wrong.
Check this: set your phone to take its time from the network automatically.
If you look after computers at work
What could happen: staff cannot sign in to the network because a computer's clock has drifted.
Check this: make sure every machine takes its time from the same trusted source.
If you investigate security alerts
What could happen: events from two systems look out of order, and you draw the wrong conclusion.
Check this: note which time zone each log uses before you compare them.
What does it look like?
Here are made-up log lines showing the same moment written in different ways.
Example only. All values are made up.
2026-01-01T09:00:00Z EXAMPLE sign-in ok (1) 2026-01-01T04:00:00-05:00 EXAMPLE sign-in ok (2) 1767258000 EXAMPLE sign-in ok (3) 01/01/26 9:00 EXAMPLE sign-in ok (4)
- A standard timestamp in UTC. The Z at the end means no offset from UTC.
- The same moment in local time, five hours behind UTC. The -05:00 tells you the gap.
- The same moment in Unix time, counted in seconds. In a real file, this line would contain the system's own count.
- An unclear local format. Nobody can tell the time zone, or whether 01/01 is day first or month first.
Why this is risky: line 4 cannot be lined up with the others with any certainty.
The safer way: store times in UTC with the standard format, and convert to local time only for display.
How does it work?
- Agree a reference. Systems use UTC as the shared baseline [1].
- Write it clearly. The internet standard format puts the date, then the time, then the offset, as in 1985-04-12T23:20:50.52Z [1]. A local offset is "local time minus UTC" [1].
- Sort easily. Because the biggest unit comes first, matching timestamps sort into time order as plain text [1].
- Or just count. Unix time is the number of seconds since midnight UTC on 1 January 1970 [2].
- Check the clock. Security tools compare a time they receive with their own clock, and reject anything outside an allowed window.

Here are three places where that clock check matters:
- Sign-in codes. Authenticator app codes are worked out from Unix time, and by default a new code starts every 30 seconds [2]. The standard allows for some clock drift between your phone and the server [2].
- Work network sign-ins. Windows networks use a sign-in system called Kerberos, which uses timestamps to stop old messages being replayed [3]. Microsoft advises allowing at most 5 minutes between clocks [3].
- Certificates. A website's certificate holds a start date and an end date [4]. Those times are written in UTC [4], so a badly wrong clock can make a good certificate look expired.
A worked example
This story is made up to show the idea.
Noor Marlow is the only IT person at a small design studio. On Monday morning, three staff say they cannot sign in to the shared file server.
Noor checks the server first. It looks fine. Then she looks at one of the staff laptops. Its clock says it is 9:12, but her phone says 9:03.
The laptop had been set to use a manual time after a travel trip. Over the weekend it had drifted further. The studio's network sign-in only allows a small gap between clocks, so the laptop's requests were turned away.
Noor switches the laptop back to automatic time from the studio's server. The sign-in works straight away. She checks the other two laptops and finds the same setting.
Later that week, a staff member reports an odd sign-in alert. Noor opens the file server log and the cloud email log side by side. One shows local time, and the other shows UTC.
At first the sign-in seems to happen before the alert. Once she converts both to UTC, the order makes sense, and the alert turns out to be harmless.
Noor writes two notes for the studio. Every device takes its time automatically, and every log she compares gets converted to UTC first.
Myths and mistakes
| What people think | What is true |
|---|---|
| A few minutes out on a clock does not matter. | Some sign-in systems reject requests once clocks are more than a few minutes apart[3]. |
| UTC is the same as British time. | UTC has no summer time. Local time in many places moves away from it for part of the year[1]. |
| Logs from different systems can be compared as they are. | Check the time zone of each log first. Mixing local time and UTC puts events in the wrong order. |
| Authenticator codes have nothing to do with the clock. | They are worked out from the current time, so a wrong phone clock gives wrong codes[2]. |
| Writing dates as 01/02/26 is clear enough. | Different countries read that differently. The standard year-month-day format avoids the doubt[1]. |
What can I do this week?
- Check that your phone and laptop set their time automatically.
- Find out which time zone your work logs use.
- When you write a time in a report, add the time zone, or use UTC.
- Read Network Time (NTP) for Beginners to see how clocks stay in step.
Checklist
- I know computers usually store time in UTC.
- I can read a timestamp ending in Z or in an offset such as -05:00.
- I know Unix time is a count of seconds since 1 January 1970.
- My devices set their clocks automatically.
- I know a wrong clock can break sign-in codes and network sign-ins.
- I know certificates have start and end dates checked against the clock.
- I convert logs to one time zone before comparing them.
Common questions
What does the Z at the end of a timestamp mean?
It means the time is given in UTC, with no offset. The internet standard for timestamps uses Z for this. If you see something like +01:00 instead, the time is local and that many hours away from UTC.
Why does Unix time start in 1970?
It is simply the agreed starting point. Unix time counts the seconds since midnight UTC on 1 January 1970. Using one plain number makes it easy for programs to compare times and work out gaps between them.
Why do my authenticator codes stop working?
A common cause is a wrong clock on your phone. The codes are worked out from the current time, so if your phone and the server disagree by too much, the code will not match. Turning on automatic time usually fixes it.
Should my logs use local time or UTC?
UTC is the safer choice for storing logs, because it never jumps for summer time. You can still show local time on screen. What matters most is that every system uses the same choice and says which one it uses.
How does time link to access control?
Some access is meant to last only for a set time, such as admin rights for one task. Those time limits rely on accurate clocks too. Our guide to just-in-time access explains how expiring access works.
Where next?
Ready for the detail? Read the practitioner guide: JIT Access Guide. It shows how access that expires on a timer is designed, which depends on the clocks this page describes.
Also useful:
- Network Time (NTP) for Beginners
- One-Time Passcodes for Beginners
- Forensic Timelines for Beginners
- Machine Identities and Certificates for Beginners
Related NHI Mgmt Group resources: NTP Security Guide, Just-in-Time Access for Beginners and Session Timeouts for Beginners.
Key terms
- UTC
- Coordinated Universal Time, the shared world time that computers use as a fixed reference.
- Timestamp
- A record of when something happened, attached to a file, message or log line.
- Unix time
- A count of seconds since midnight UTC on 1 January 1970.
- ISO 8601
- The international standard for writing dates and times in year, month, day order.
- Clock skew
- The gap between two computers' clocks, and how much gap a system will accept.
- TOTP
- Time-based one-time password: a short sign-in code worked out from a shared secret and the current time.
Sources and further reading
- G. Klyne and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, IETF, July 2002. https://www.rfc-editor.org/rfc/rfc3339 (accessed 30 Nov 2026).
- D. M'Raihi and others, "TOTP: Time-Based One-Time Password Algorithm", RFC 6238, IETF, May 2011. https://www.rfc-editor.org/rfc/rfc6238 (accessed 30 Nov 2026).
- Microsoft, "Maximum tolerance for computer clock synchronization", Microsoft Learn. https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/maximum-tolerance-for-computer-clock-synchronization (accessed 30 Nov 2026).
- D. Cooper and others, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, IETF, May 2008. https://www.rfc-editor.org/rfc/rfc5280 (accessed 30 Nov 2026).