Operating systems have a unique way of keeping track of time. They use a method called Epoch Date.
In an epoch date model, the operating system keeps track of the number of “ticks” since a defined point of time. Each operating system will chose a different measurement of time “tick” and a different point in time to start, or the “epoch”. The operating system will then track the current date/time as the number of “ticks” since the “epoch”.
Example:
Unix uses an epoch start date of January 1, 1970, and a tick of seconds. So to represent the current date of April 20, 2020 you would count the number of seconds since January 1, 1970, which would be 1587410846 seconds.
This makes it very easy for operating systems to compute how much time has elapsed between two dates or when 30 days ago was by just doing simple addition/subtraction of the number of seconds between those dates.
When a device is powered on, the operating system will start keeping time starting at the epoch. At that point the operating system will try to determine the date/time from a hardware clock if one is present. Modern PC/Servers motherboards have a hardware clock that is powered by a small coin sized battery that allows the clock to keep time even when powered off. Once the date/time is read from the hardware clock, the current date/time will be re-computed from the epoch and will continue to increment from there.
But network devices such as routers and switches do not have this type of hardware clock. So these devices will be stuck keeping time from their epoch unless the date/time are manually set or the device reaches out to an NTP server for an update.
For those that remember the Y2K issue, you may remember how afraid we all were that the world was going to end when our systems couldn’t change their year from 99 to 00. Well we have a much larger issue pending. All of our operating systems will need to be updated as they all have end-of-time dates when the data structure that holds the number of ticks will run out of space.
Operating System | Tick | Epoch Start | End |
MS Dos | 1 Second | January 1, 1980 | January 1, 2108 |
Windows | 100 Nanoseconds | January 1, 1601 | 30828 |
Mac OS | 1 Second | January 1, 1904 | February 6, 2040 |
Unix | 1 Second | January 1, 1970 | January 19, 2038 |
Cisco IOS Devices | March 1, 1993 March 2, 2002 |
Leave a Reply