A Little Knowledge about Timezone
The Curious Case of Singapore
On December 31, 1981, at precisely 23:11:30 local time (UTC+07:30), Singapore shifted its timezone from UTC+07:30 to UTC+08:00. This means that the last second of 1981 in Singapore was 23:29:59, and the very next second began January 1, 1982, at 00:00:00.
We can verify this historical shift using the CLI on Linux:
❯ TZ=Asia/Singapore date -r 378662399
Thu Dec 31 23:29:59 +0730 1981
❯ TZ=Asia/Singapore date -r 378662400
Fri Jan 1 00:00:00 +08 1982
We can also conclude that timezone data isn't just about current offsets, it also preserves historical changes. For example, any timestamp before this transition follows UTC+07:30:
❯ TZ=Asia/Singapore date -r 0
Thu Jan 1 07:30:00 +0730 1970
Comparing with CST
Unlike Singapore, China Standard Time (CST) has always been UTC+08:00:
❯ TZ=Asia/Shanghai date -r 0
Thu Jan 1 08:00:00 CST 1970