What is Epoch Time or UNIX Time? How to Convert Epoch Time to Readable Format

EPOCH! What is that? We know many of you would be curious to know what is epoch time or Unix time. Yes, it is the fact that many system administrators don’t know what exactly is epoch time. So, in this article we are going to cover this least talked topic.

What is Epoch Time

Epoch time is also known by names like, Unix time and POSIX time and it is the time which is calculated from 1st January 1970 (UTC). Note that it does not include unix leap seconds.

Basically, it is the number of seconds that have passed since 1st January 1970 (UTC). So, when you see this figure, it is quite a large number. Please do not confuse EPOCH time with Unix leap seconds. Both are different.

At the time of writing this article, EPOCH time was 1488046252 seconds.

Why Epoch Time is Used?

Unix Time or Epoch time is used in UNIX based system generally to note down time stamp. In some software’s like Veritas VxVM, you may see such values in the properties of virtual objects like Disk Groups, disk media name, etc.

Also, it is very easy to do mathematical calculations with epoch time. Like we can simply add or subtract two epoch numbers and can get the exact human readable time.

Converting Epoch Time to Human Readable Format in Command Line

As we told you above, Epoch time is the time in seconds which is calculated since January 1st, 1970, so to convert epoch or Unix time to human readable form, you just have to calculate the time in seconds elapsed since January 1st, 1970.

But, doing this calculation yourself would take a lot of calculation and time. So in Unix system you can easily convert epoch time to human readable format in command line and can get the exact date and time.

Epoch Conversion in Solaris

 server# echo "0t1486361410=Y" | mdb
                2017 Feb  5 22:10:10

Epoch Conversion in Linux

 root@rhel7 ~] date -d @1486361410
Mon Feb  6 01:10:10 EST 2017

Note: Please note that the time displayed from the output of above commands may differ as per the timezone set in the server.

Even if you don’t want to use UNIX systems to convert epoch time, you can directly use online epoch conversion tools.

Do let us know if you have any query or doubts on this article.

We are sure you must have got knowledge about epoch or UNIX time with this article. If you like this article do share it with your friends and colleagues. Also, do not forget to subscribe to Storage Tutorials by Email for more such interesting tutorials.

Add Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Privacy Preference Center