How to convert epoch timestamp to human readable date format in Bash?

In Bash, how to convert an epoch timestamp to a human readable date format?

In Bash, you can use the date command’s -d option:

date -d @<your epoch>

Here @ specifies the epoch timestamp.

One example:

$ date -d @1490157520.05
Wed Mar 22 12:38:40 HKT 2017
Leave a Reply

Your email address will not be published. Required fields are marked *