$ date -u; date; date +%s
Sun Sep 13 12:26:39 UTC 2020
Sun Sep 13 17:56:39 IST 2020
1599999999
$ date -u; date; date +%s
Sun Sep 13 12:26:40 UTC 2020
Sun Sep 13 17:56:40 IST 2020
1600000000
An important point worth noting from the POSIX.1-2008 specification:
"Coordinated Universal Time (UTC) includes leap seconds. However, in POSIX time (seconds since the Epoch), leap seconds are ignored (not applied) to provide an easy and compatible method of computing time differences. Broken-down POSIX time is therefore not necessarily UTC, despite its appearance."
By the way, in case you got curious like me to find out if this Hacker News story (the original post) was posted exactly at this time, the answer is, it was posted at Unix timestamp 1599999975. See https://hacker-news.firebaseio.com/v0/item/24460382.json for the details.
Over long periods of time the approximation that a day takes 86400 SI seconds will become less and less accurate as the rotational period of the Earth changes. I wish calendars would be either purely astronomical in nature or purely SI in nature. Hybrid systems like UTC become more and more messy over time as the amount of adjustment needed increases. We've had ~25 leap seconds in UTC already, and it's a relatively young calendar system.
EDIT: I also wish we would change the name of the SI measurement "second". An SI second and an astronomical second are two different things, and deserve two different names.
Reproduced as text below:
An important point worth noting from the POSIX.1-2008 specification:"Coordinated Universal Time (UTC) includes leap seconds. However, in POSIX time (seconds since the Epoch), leap seconds are ignored (not applied) to provide an easy and compatible method of computing time differences. Broken-down POSIX time is therefore not necessarily UTC, despite its appearance."
See https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd... for more details on the above point.
By the way, in case you got curious like me to find out if this Hacker News story (the original post) was posted exactly at this time, the answer is, it was posted at Unix timestamp 1599999975. See https://hacker-news.firebaseio.com/v0/item/24460382.json for the details.