Skip to content

Security operations

Unix Timestamps, Epoch Milliseconds and FILETIME Explained

Read any timestamp in logs: Unix seconds, milliseconds, microseconds, Windows FILETIME and LDAP times, with commands and a free local epoch converter.

By Asad Ali, IT Support EngineerSC-200 · ISC2 CCPublished 2 min read
Unix Timestamp Unit Detection Chart: 10-Digit Seconds, 13-Digit Milliseconds, 16-Digit Microseconds and 18-Digit FILETIME
Unix Timestamp Unit Detection Chart: 10-Digit Seconds, 13-Digit Milliseconds, 16-Digit Microseconds and 18-Digit FILETIME

A Unix timestamp counts seconds since 1970-01-01 00:00:00 UTC. It is how Linux, databases, JWT tokens and most APIs store time, and it is the first thing you have to decode when building an incident timeline from mixed log sources.

The catch is that systems disagree on the unit: seconds, milliseconds, microseconds, nanoseconds, or Windows’ own 100-nanosecond FILETIME counted from 1601. This guide shows how to tell them apart at a glance and convert each one. Paste any value into the Unix timestamp converter to check your reading.

How do you tell seconds from milliseconds?

Count the digits. For current dates, 10 digits are seconds, 13 are milliseconds, 16 are microseconds and 19 are nanoseconds. 18 digits starting with 13 are usually Windows FILETIME.

The same instant, 2026-01-01 00:00:00 UTC, in each unit
UnitDigitsValueTypical source
Seconds101767225600Linux date +%s, JWT exp, PostgreSQL
Milliseconds131767225600000JavaScript, Java, Elasticsearch, Kafka
Microseconds161767225600000000journald, Python time.time_ns()//1000
Nanoseconds191767225600000000000Go, Prometheus, OpenTelemetry
FILETIME18134116992000000000Windows events, NTFS, AD lastLogon

How do you convert Windows FILETIME and LDAP timestamps?

FILETIME counts 100-nanosecond ticks since 1601-01-01 UTC. Divide by 10,000,000 and subtract 11,644,473,600 to get Unix seconds.

unix_seconds = filetime / 10,000,000 − 11,644,473,600

Convert in PowerShell and Python
[DateTime]::FromFileTimeUtc(134116992000000000)
python -c "print(134116992000000000/1e7 - 11644473600)"

Active Directory attributes such as lastLogonTimestamp, pwdLastSet and accountExpires use the same format. accountExpires = 9223372036854775807 means "never". Paste the raw value into the converter and it detects the FILETIME automatically.

Which time-zone mistakes break incident timelines?

Mixing UTC and local times, parsing ISO strings without an offset as local time, and forgetting daylight saving changes. Normalise everything to UTC before you sort.

  • Windows Event Viewer shows local time, but the underlying SystemTime is UTC.
  • 2026-11-21T09:30:00 without Z is parsed as local time by most libraries.
  • Syslog (RFC 3164) has no year and no zone, so add both from the collector.
  • Spreadsheets store dates as serial days; =A1/86400+DATE(1970,1,1) converts epoch seconds in UTC.

For planning, the converter also shows the ISO 8601 week number and day of year, see the week number preset.

Frequently asked questions

Signed 32-bit Unix time overflows at 2038-01-19 03:14:07 UTC. Systems that still store time in 32 bits will wrap to 1901; 64-bit time avoids it.

Try it in your browser

About the author: Asad Ali

IT Support Engineer and SOC analyst · Microsoft SC-200 & ISC2 CC certified

Asad Ali is an IT Support Engineer and SOC analyst with a Computer Science degree from UET Lahore. He holds the Microsoft SC-200 Security Operations Analyst and ISC2 Certified in Cybersecurity (CC) certifications, works on threat detection, network analysis and Linux administration, and builds and maintains every tool on LocalSecTools.

  • Microsoft Certified: Security Operations Analyst (SC-200)
  • ISC2 Certified in Cybersecurity (CC)

Every guide is written and technically reviewed by Asad Ali, and the commands and numbers are checked against the LocalSecTools calculators. Read more about his work at asadali.tech.

More engineering guides