Epoch (computing)
Date and time from which a computer measures system time
title: "Epoch (computing)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["calendaring-standards"] description: "Date and time from which a computer measures system time" topic_path: "general/calendaring-standards" source: "https://en.wikipedia.org/wiki/Epoch_(computing)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Date and time from which a computer measures system time ::
In computing, an epoch is a fixed date and time used as a reference from which a computer measures system time. Most computer systems determine time as a number representing the seconds removed from a particular arbitrary date and time. For instance, Unix and POSIX measure time as the number of seconds that have passed since Thursday 1 January 1970 00:00:00 UT, a point in time known as the Unix epoch. The C# programming language and Windows NT systems up to and including Windows 11 and Windows Server 2022 measure time as the number of 100-nanosecond intervals that have passed since 00:00:00 UTC on 1 January in the years AD 1 and AD 1601, respectively, making those points in time the epochs for those systems. Computing epochs are almost always specified as midnight Universal Time on some particular date.
Resolution and representation
Software timekeeping systems vary widely in the resolution of time measurement; some systems may use time units as large as a day, while others may use nanoseconds. For example, for an epoch date of midnight UTC (00:00) on 1 January 1900, and a time unit of a second, the time of the midnight (24:00) between 1 January 1900 and 2 January 1900 is represented by the number 86400, the number of seconds in one day. When times prior to the epoch need to be represented, it is common to use the same system, but with negative numbers.
Such representation of time is mainly for internal use. On systems where date and time are important in the human sense, software will almost always convert this internal number into a date and time representing a human calendar.
Problems
Computers do not generally store arbitrarily large numbers. Instead, each number stored by a computer is allotted a fixed amount of space. Therefore, when the number of time units that have elapsed since a system's epoch exceeds the largest number that can fit in the space allotted to the time representation, the time representation overflows, and problems can occur. While a system's behavior after overflow occurs is not necessarily predictable, in most systems, the number representing the time will reset to zero, and the computer system will think that the current time is the epoch time again.
Most famously, older systems that counted time as the number of years elapsed since the epoch of 1 January 1900 and which only allotted enough space to store the numbers 0 through 99, experienced the Year 2000 problem. These systems (if not corrected beforehand) would interpret the date 1 January 2000 as 1 January 1900, leading to unpredictable errors at the beginning of the year 2000.
Even systems that allocate more storage to the time representation are not immune to this kind of error. Many Unix-like operating systems which keep time as seconds elapsed from the epoch date of 1 January 1970, and allot timekeeping enough storage to store numbers as large as 2 147 483 647 will experience an overflow problem on 19 January 2038. This is known as the Year 2038 problem.
Other more subtle timekeeping problems exist in computing, such as accounting for leap seconds, which are not observed with any predictability or regularity. Additionally, applications that need to represent historical dates and times (for example, representing a date prior to the switch from the Julian calendar to the Gregorian calendar) must use specialized timekeeping libraries.
Finally, some software must maintain compatibility with older software that does not keep time in strict accordance with traditional timekeeping systems. For example, Microsoft Excel observes the fictional date of 29 February 1900 in order to maintain bug compatibility with older versions of Lotus 1-2-3. Lotus 1-2-3 observed the date due to an error; by the time the error was discovered, it was too late to fix it—"a change now would disrupt formulas which were written to accommodate this anomaly".
In satellite-based time systems
There are at least six satellite navigation systems, all of which function by transmitting time signals. Of the only two satellite systems with global coverage, GPS calculates its time signal from an epoch, whereas GLONASS calculates time as an offset from UTC, with the UTC input adjusted for leap seconds. Of the only two other systems aiming for global coverage, Galileo calculates from an epoch and BeiDou calculates from UTC without adjustment for leap seconds. GPS also transmits the offset between UTC time and GPS time and must update this offset every time there is a leap second, requiring GPS-receiving devices to handle the update correctly. In contrast, leap seconds are transparent to GLONASS users. The complexities of calculating UTC from an epoch are explained by the European Space Agency in Galileo documentation under "Equations to correct system timescale to reference timescale".
Notable epoch dates in computing
The following table lists epoch dates used by popular software and other computer-related systems. The time in these systems is stored as the quantity of a particular time unit (days, seconds, nanoseconds, etc.) that has elapsed since a stated time (usually midnight UTC at the beginning of the given date).
::data[format=table]
| Epoch date | Notable uses | Rationale for selection |
|---|---|---|
| 0 January 1 BC | MATLAB | "Year 0" in ISO 8601 |
| 1 January AD 1 | Go]], REXX, Rata Die | Common Era, ISO 2014, RFC 3339 |
| 1582-10-1414 October 1582 | SPSS, IBM z/OS Language Environment, IBM AIX COBOL | Same as below, but with one-based indexing |
| 1582-10-1515 October 1582 | UUID version 1 | The date of the Gregorian reform to the Christian calendar. |
| 1601-01-011 January 1601 | url=https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime | title=FILETIME structure (minwinbase.h) |
| 1840-12-3131 December 1840 | MUMPS programming language | 1841 was a non-leap year several years before the birth year of the oldest living US citizen when the language was designed. |
| 1858-11-1717 November 1858 | TENEX,VMS, United States Naval Observatory, DVB SI 16-bit day stamps, other astronomy-related computations | 17 November 1858, 00:00:00 UT is the zero of the Modified Julian Day (MJD) equivalent to Julian day 2400000.5 |
| 10 May 1869 | PHAMIS date, used in Lastword/Carecast/Centricity Enterprise EHR running on Tandem/NonStop servers | The date of the transcontinental railroad Golden Spike, when the Central Pacific and Union Pacific railroads finally met at Promontory Summit, UT in May 1869. |
| 1899-12-3030 December 1899 | Microsoft COM DATE, Object Pascal, LibreOffice Calc, Google Sheets | Technical internal value used by Microsoft Excel; for compatibility with Lotus 1-2-3. |
| 1899-12-3131 December 1899 | Dyalog APL, Microsoft C/C++ 7.0 | Chosen so that (date mod 7) would produce 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, and 6=Saturday. Microsoft's last version of non-Visual C/C++ used this, but was subsequently reverted. |
| 1900-01-000 January 1900 | Microsoft Excel, Lotus 1-2-3 | While logically 0 January 1900 is equivalent to 31 December 1899, these systems do not allow users to specify the latter date. Since 1900 is incorrectly treated as a leap year in these systems, 0 January 1900 actually corresponds to the historical date of 30 December 1899. |
| 1900-01-011 January 1900 | Network Time Protocol, Time Protocol, CICS, IBM operating systems from MVS to z/OS, Mathematica, RISC OS, VME, Common Lisp, Michigan Terminal System | |
| 1901-01-011 January 1901 | Ada | In the first version of the language, dates were limited to the range 1901 to 2099 to avoid years affected by the 400 year leap year rule. When the upper bound was expanded in later versions, the lower bound was left the same to maintain backward compatibility with systems that used it as a datum. |
| 1904-01-011 January 1904 | LabVIEW, Apple Inc.'s classic Mac OS, JMP Scripting Language, Palm OS, MP4, Microsoft Excel (optionally), IGOR Pro | 1904 is the first leap year of the 20th century. |
| 1 January 1960 | SAS System | |
| 1967-12-3131 December 1967 | Pick OS and variants (jBASE, Universe, Unidata, Revelation, Reality) | Chosen so that (date mod 7) would produce 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, and 6=Saturday. |
| 1970-01-011 January 1970 | Unix epoch used in POSIX time, used by Unix and Unix-like systems (Linux, macOS, Android), and programming languages: most C/C++ implementations, Java, JavaScript, Perl, PHP, Python, Ruby, Tcl, ActionScript. Also used by Precision Time Protocol. | |
| 1978-01-011 January 1978 | AmigaOS. The Commodore Amiga hardware systems were introduced between 1985 and 1994. Latest OS version 4.1 (December 2016). AROS, MorphOS. | |
| 1980-01-011 January 1980 | IBM BIOS INT 1Ah, DOS, OS/2, FAT12, FAT16, FAT32, exFAT filesystems, ZIP format and derivatives | The IBM PC with its BIOS as well as 86-DOS, MS-DOS and PC DOS with their FAT12 file system were developed and introduced between 1980 and 1981. |
| 1980-01-066 January 1980 | Qualcomm BREW, GPS, ATSC 32-bit time stamps | GPS counts weeks (a week is defined to start on Sunday) and 6 January is the first Sunday of 1980. Weeks are stored in a 10-bit integer, and the first GPS week number rollover occurred in August 1999. |
| 1989-12-3131 December 1989 | Garmin FIT Epoch. Standard originated by Garmin as part of their FIT Protocol, which has been adopted by many as a de facto standard in the fitness devices industry. | |
| 2000-01-011 January 2000 | Ingenuity]] helicopter, GameCube | This Y2K epoch is used sometimes to push the 2038 problem to the year 2068, if the processor does not support 64-bit. |
| 2001-01-011 January 2001 | NSDate in Apple's Cocoa framework, NeXTSTEP | First day of the third millennium A.D. |
| 2005-01-011 January 2005 | default date as the start base of Samsung's Bada OS on Samsung Wave and Samsung Wave II (not Android) Bada OS is linux-based | the 1st day of the year 2005. |
| :: |
Notes
References
References
- "FILETIME structure (minwinbase.h)".
- (1 September 1973). "TENEX JSYS Manual". [[Raytheon BBN.
- "CICS Transaction Server for z/OS 5.6 API Reference". IBM.
- "CICS for iSeries Application Programming Guide Version 5". IBM.
- "CICS Application Programming Reference Version 5.0". IBM.
- [[John Barnes (computer scientist). "7.3 Times and dates". Ada Resource Association.
- NASA JPL. (4 May 2021). "The Force is strong with this little one".
- "Yet Another Gamecube Documentation".
- "NeoGPS/src/NeoTime.cpp at master · SlashDevin/NeoGPS".
- (30 March 2020). "[MS-DTYP]: FILETIME".
- (2011). "Time References in GNSS". European Space Agency.
- (2016). "GNSS Timescale Description Galileo". United Nations Office for Outer Space Affairs.
- (2008). "Calendrical Calculations". [[Cambridge University Press]].
- "datenum - (Not recommended; use datetime or duration) Convert date and time to serial date number".
- "GregorianCalendar Class (System.Globalization)".
- "DateTimeOffset Structure (System)".
- "Package time". golang.org.
- "Date". IBM.
- (2008). "Calendrical Calculations". Cambridge University Press.
- (1990). "The Rexx Language: A Practical Approach to Programming". Prentice Hall.
- (28 March 2012). "Go 1 Release Notes—Major changes to the library—Time". golang.org.
- "Date and Time Formats". IBM.
- (July 2005). "RFC 4122: Proposed Standard: A Universally Unique IDentifier (UUID) URN Namespace". Internet Engineering Task Force.
- (6 March 2009). "Why is the Win32 epoch January 1, 1601?". MSDN Blogs.
- "What happened in 1841?". M Technology and MUMPS Language FAQ, Part 1/2.
- "Modified Julian Date". [[U.S. Naval Observatory]].
- "VMS base time origin". Technische Universität Wien.
- "Introduction to the Google Sheets API".
- (19 February 2008). "Why are the Microsoft Office file formats so complicated? (And some workarounds)".
- "International Day Number".
- "Time Management".
- "What is story behind December 30, 1899 as base date?".
- "Dates And Times In Excel".
- "MacTech – The journal of Apple technology.".
- Mark Pick, International Spectrum Conference April 2010.
- "Introduction to Dates and Times in SAS".
- "time_t – C++ Reference".
- (September 1998). "File: The Year 2000 Problem and the Amiga".
- (5 July 2002). "Time and frequency distribution using satellites". Reports on Progress in Physics.
- "Time Systems and Dates – GPS Time". Naval Postgraduate School, Oceanography Department.
- "AppleSingle/AppleDouble Formats for Foreign Files Developer's Note".
- (27 October 2016). "PostgreSQL 9.1.24 Documentation. Chapter 8: Data Types. 8.5. Date/Time Types".
- "ZigBee Cluster Library Specification".
- (1 June 2014). "ISO/IEC 1989:2014 - Information technology — Programming languages, their environments and system software interfaces — Programming language COBOL". [[ISO]].
- (2021-03-22). "CEEDATM—Convert seconds to character timestamp". [[IBM]].
- (June 2015). "COBOL for AIX Programming Guide Version 5.1". [[IBM]].
- (1 March 2019). "Flexible and Interoperable Data Transfer - FIT Protocol". garmin.com.
- (1 January 2023). "FIT SDK - Working with Date Time Values". garmin.com.
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::