timestamp
This is a wiki page. Be bold and improve it!
If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.
Convert UNIX timestamp to date:
$ date -d @1514390400
Thu 28 Dec 00:00:00 CST 2017
// Get the current timestamp:
$ date +%s
1522293932
// Format a timestamp:
$ date -d @1522293932 "+%F-%H-%M-%S %:z"
2018-03-29-11-25-32 +08:00
// Output the same timestamp in a different timezone:
$ TZ=UTC date -d @1522293932 "+%F-%H-%M-%S %:z"
2018-03-29-03-25-32 +00:00
$ TZ=Asia/Tokyo date -d @1522293932 "+%F-%H-%M-%S %:z"
2018-03-29-12-25-32 +09:00