home / codeberg / blog / docs



Timezones in Plan9

I think every sane working operating system has a timezones, and plan9 does to. But as I noticed, they are very strange in 9's, there's no UTC+5 in /adm/timezone/, and it's kind of problem to me because I have UTC+5. BUT, I found out how to fix it. Just add:

IST 18000 IST 18000
0

In /adm/timezone/local file, or in /adm/timezone/Asia_Qazaqstan and copy it in /adm/timezone/local

After, just reboot

fshalt -r

The 18000 number is seconds from UTC+0, if you wanna for example UTC+N but it's not supported, just convert N in seconds. I dont know how to make it work with UTC-N, but I think all UTC-N are supported, because it's Americas, no one forgets about add their timezones

But if your time still incorrect, you need to sync it with timesync. You can sync it to #r/rtc(Local real time clock)

aux/timesync -r

...or sync it to an NTP server

aux/timesync -n

To make it work automaticaly, you need to add timesync command to rc init, located in $home/lib/profile, or as I recommend, in riostart if you have it, located in $home/bin/rc/riostart