Hands-on task
This task is step 2 of the course “Dates and times in the terminal”
Convert Unix time to a date (UTC)
The file /root/ts.txt contains a Unix timestamp (the number of seconds since 1970-01-01, the epoch) — 1700000000. Convert it to a human-readable date in UTC in the format YYYY-MM-DD HH:MM:SS and write the result to /root/out.txt (on a single line, with no timezone in the text). Note: the sandbox's system time zone is Europe/Berlin, not UTC.
Reference:date
What you'll practise:
- date
- unix time
- epoch
- utc
- date formatting