Convert Unix Timestamp to Date: Quick Guide
In Unix systems, a timestamp represents the number of seconds elapsed from 00:00:00 UTC on January 1, 1970 to the current time. To convert a Unix timestamp to a regular time format, you can use the date command.
If we have a Unix timestamp of 1615210220, we can use the following command to convert it into a regular time format:
date -d @1615210220
This will output the corresponding date and time of the timestamp.
You can utilize the + option of the date command to convert a timestamp to a specific format. For example:
date -d @1615210220 +"%Y-%m-%d %H:%M:%S"
This will output the date and time corresponding to the timestamp, and the format will be “Year-Month-Day Hour:Minute:Second”.