GPS Time to Unix Timestamp Converter
Convert GPS time — seconds since January 6, 1980 with no leap seconds — to a Unix timestamp and readable UTC date. Explains the GPS epoch and how GPS time diverges from UTC by leap seconds.
What is GPS time?
GPS time is a continuous time scale that began at 00:00:00 UTC on January 6, 1980 and, unlike UTC, never inserts leap seconds. As a result GPS time has drifted ahead of UTC; as of 2017 the difference is 18 seconds and it stays fixed until the next leap second is announced.
- Epoch: 1980-01-06 00:00:00 UTC
- No leap seconds — GPS is a continuous count of SI seconds
- GPS − UTC = 18 seconds (current, since 2017-01-01)
- Often expressed as GPS week number + seconds-into-week
How to convert GPS time to a Unix timestamp
There are 315,964,800 seconds between the Unix epoch (1970) and the GPS epoch (1980). Add that offset, then subtract the current leap-second difference so the result lands on UTC.
- Unix seconds = GPS + 315964800 − 18
- Example: 1384035218 → 1700000000 → 2023-11-14 22:13:20 UTC
- Reverse: GPS = Unix seconds − 315964800 + 18
- This converter applies the current 18-second offset
Leap seconds and accuracy
The leap-second offset is not constant over history: it was 0 in 1980 and has grown to 18. Converting a GPS time from, say, 2005 (when the offset was 13) with today’s 18-second value introduces a small error. For high-accuracy historical work, apply the leap-second count that was in effect at that GPS time. For present-day conversions the 18-second offset is correct.
- Offset history: 0 s (1980) → 13 s (2006) → 16 s (2012) → 17 s (2015) → 18 s (2017)
- GPS week rollovers (1024 weeks) can also confuse week-based parsing
- Receivers usually output UTC already; raw GPS time mainly appears in RINEX and ephemeris data
- What is the GPS epoch?
- GPS time starts at 00:00:00 UTC on January 6, 1980.
- Why is GPS time ahead of UTC?
- GPS time does not include leap seconds, while UTC does. Since 1980, 18 leap seconds have been added to UTC, so GPS is currently 18 seconds ahead.
- How do I convert GPS time to Unix time?
- Add 315,964,800 seconds (the 1970→1980 gap) and subtract the current 18-second leap-second offset to get a UTC Unix timestamp.