Description

The article will explain the different timezone format showed on different release. 

Symptoms

The timezone is set to Asia/Singapore on routers. However, it shows different format on different releases. The 16.1 displays SGT, the 23.2 displays +8. 

16.1R7
show system uptime 
Current time: 2023-10-23 10:13:55 SGT
Time Source:  NTP CLOCK 
System booted: 2023-10-15 23:47:11 SGT (1w0d 10:26 ago)
Protocols started: 2023-10-15 23:48:35 SGT (1w0d 10:25 ago)
Last configured: 2023-10-19 10:43:46 SGT (3d 23:30 ago) by labroot
10:13AM  up 7 days, 10:27, 1 users, load averages: 0.59, 0.69, 0.78

23.2R1

show system uptime 
Current time: 2023-10-23 10:14:22 +08
Time Source:  NTP CLOCK 
System booted: 2023-10-15 23:33:20 +08 (1w0d 10:41 ago)
Protocols started: 2023-10-15 23:35:02 +08 (1w0d 10:39 ago)
Last configured: 2023-10-19 13:13:05 +08 (3d 21:01 ago) by labroot
10:14AM  up 7 days, 10:41, 1 users, load averages: 0.14, 0.26, 0.29
 

Solution

The timezone info is saved on /var/etc/localtime, which is linked to directory /usr/share/zoneinfo. We can see the format has been changed on both releases. This change is due to changes in tzdb(time-zone database) on IANA. Some countries switch to numeric time zone abbreviations.

ls -l /var/etc/localtime 
lrwxr-xr-x  1 root  wheel  34 Oct 19 10:42 /var/etc/localtime -> /usr/share/zoneinfo/Asia/Singapore

16.1:
file show /usr/share/zoneinfo/Asia/Singapore                
TZif2
ä`ʳå`Ë‘_\x08ÒHmð÷ºMˆ\x16‘õ\x08\x01\x02\x03\x04\x05\x04\x06\x07
ä`ÿÿÿÿʳå`ÿÿÿÿË‘_\x08ÿÿÿÿÒHmðÿÿÿÿ÷ºMˆ
SGT-8

23.2R1:
file show /usr/share/zoneinfo/Asia/Singapore 
TZif2
ä`ʳå`Ë‘_\x08ÒHmð\x16‘õ\x08\x01\x02\x03\x04\x05\x04\x06
ä`ÿÿÿÿʳå`ÿÿÿÿË‘_\x08ÿÿÿÿÒHmð
<+08>-8



https://data.iana.org/time-zones/tzdb/NEWS
 
 
Changes to past and future time zone abbreviations
Switch to numeric time zone abbreviations for South America, as part of the ongoing project of removing invented abbreviations. This avoids the need to invent an abbreviation for the new Chilean new zone. Similarly, switch from invented to numeric time zone abbreviations for Afghanistan, American Samoa, the Azores, Bangladesh, Bhutan, the British Indian Ocean Territory, Brunei, Cape Verde, Chatham Is, Christmas I, Cocos (Keeling) Is, Cook Is, Dubai, East Timor, Eucla, Fiji, French Polynesia, Greenland, Indochina, Iran, Iraq, Kiribati, Lord Howe, Macquarie, Malaysia, the Maldives, Marshall Is, Mauritius, Micronesia, Mongolia, Myanmar, Nauru, Nepal, New Caledonia, Niue, Norfolk I, Palau, Papua New Guinea, the Philippines, Pitcairn, Qatar, Réunion, St Pierre & Miquelon, Samoa, Saudi Arabia, Seychelles, Singapore, Solomon Is, Tokelau, Tuvalu, Wake, Vanuatu, Wallis & Futuna, and Xinjiang; for 20-minute daylight saving time in Ghana before 1943; for half-hour daylight saving time in Belize before 1944 and in the Dominican Republic before 1975; and for Canary Islands before 1946, for Guinea-Bissau before 1975, for Iceland before 1969, for Indian Summer Time before 1942, for Indonesia before around 1964, for Kenya before 1960, for Liberia before 1973, for Madeira before 1967, for Namibia before 1943, for the Netherlands in 1937-9, for Pakistan before 1971, for Western Sahara before 1977, and for Zaporozhye in 1880-1924.
 

Modification History

2023-10-22 : Article Created