realepochconverter
ldap timestamp converter

LDAP / Active Directory Timestamp Converter

Active Directory stores every important moment — password changes, account expirations, object creation — as an 18-digit count of 100-nanosecond intervals since January 1, 1601 UTC. Paste one here and it becomes a readable date instantly.

converter

LDAP / Active Directory time.

The 18-digit AD FileTime values from pwdLastSet, accountExpires, and LDAP whenChanged — decoded with plain arithmetic.

100-nanosecond intervals since January 1, 1601 UTC.

What an AD FileTime is

Windows represents timestamps as a count of 100-nanosecond intervals since the "Windows epoch": January 1, 1601, 00:00:00 UTC. The same format appears across the Windows ecosystem under different names:

  • LDAP attributespwdLastSet, accountExpires, lastLogon, whenCreated, whenChanged, lastLogonTimestamp.
  • Active Directory — the ADsLargeInteger 64-bit value shown by Get-ADUser and dsquery.
  • Win32FILETIME, as returned by GetFileTime() and the registry's RegQueryValueEx.

A value around 134305344000000000 corresponds to August 7, 2026 — the constant gap to the Unix epoch is 11644473600 seconds (1601 → 1970).

The math

  • LDAP → Unix seconds: value / 10_000_000 - 11644473600.
  • Unix seconds → LDAP: (unix + 11644473600) * 10_000_000.
  • In milliseconds: divide the LDAP value by 10_000 instead, and the offset becomes 11644473600000 ms.

Example conversions

  • 116444736000000000 → January 1, 1970 00:00:00 UTC — the Unix epoch, in AD terms.
  • 134305344000000000 → August 7, 2026 00:00:00 UTC.

In your own code

  • PowerShell: [DateTime]::FromFileTime(134305344000000000) and [DateTime]::UtcNow.ToFileTimeUtc().
  • C#: DateTime.FromFileTimeUtc(134305344000000000) / DateTime.UtcNow.ToFileTimeUtc().
  • Python: datetime(1601, 1, 1, tzinfo=timezone.utc) + timedelta(microseconds=value / 10).
  • Go: time.Unix(0, (value-116444736000000000)*100).

Gotchas

  • 64-bit precision — current values are ~18 digits, beyond JavaScript's safe-integer range. This converter uses BigInt, and so should your scripts.
  • Always UTC — FileTime values are UTC by definition; convert to local time only for display.
  • accountExpires — a value of 0 or 9223372036854775807 (max Int64) means "never expires", not a real date.
  • Not the same as Unix — the 1601 epoch predates 1970 by 11,644,736 seconds; forgetting the offset is the classic off-by-369-years bug.

Related tools

Need the result in another timezone or precision? TheUnix timestamp to date converter takes it from here, and the .NET ticks converter covers the sibling "ticks since year 1" format.

Related converters

Copied