[Shell command] Convert a Unix timestamp to a date and time on Linux

Created on November 30, 2026

GNU date accepts a Unix timestamp in seconds after @ when you use the -d option. The output uses the local time zone by default. This example selects Japan Standard Time and an explicit format.

TZ=Asia/Tokyo date -d @1635800010 '+%Y-%m-%d %H:%M:%S %Z'
2021-11-02 05:53:30 JST
Shell command