What is Unix Time?

Unix Time is described as the number of seconds passed since the time on Thursday, January 1st, 1970. Unix Time could also be referred to as the Posix Time or the Unix Epoch Time. It uses the UTC time standard but does not include the leap seconds. It is widely used in Unix-like operating systems and file formats. Unix Time can be used globally anywhere since it does not change depending on the location. So it is useful for keeping track of dated information.

How is Unix Time represented?

Unix Time is represented as a signed 32-bit number which increments every second. For example, let's say on Feb 26, 2019 at 22:30:50 GMT, the unix time was 1551220250. Now we convert the decimal representation, 1551220250, to a 32 binary number. This binary number would look like this: 0101 1100 0111 0101 1011 1110 0001 1010. As you can see, this number is just 0's and 1's, and there are thirty-two of them.

How did Unix Time get its name?

The Unix Epoch time is the time on midnight of January 1st, 1970. Therefore, the Unix Time is zero at the Unix Epoch. Since Unix time is the number of seconds since the Unix Epoch time, it is sometimes called the epoch time or unix epoch. There are other names for Unix time as well. It can be called POSIX time or Unix timestamp. All these different names must be confusing but just know that there are a variety of ways to call Unix time.

How does the computer or any electronic device keep track of the time?

Inside the computer, time is represented by a counter. The Real Time Clock is a computer clock that is in the form of an integrated circuit that helps keep track of time even when the computer is turned off. This is called RTC for short. The RTC is powered by a lithium battery in older systems, a supercapacitor in newer systems, or a battery backed RAM. Each second, a pulse from the RTC happens so each second is added to the counter. So for a computer to know what time it is now, it must know how many seconds elapsed since the Unix Epoch time or on midnight of January 1st, 1970.