Timezone update in SCO

Timezone update in SCO

Ira Abramov Lists-Linux-IL at ira.abramov.org
Fri Mar 27 12:08:11 IDT 2009


Spent some time yesterday at a client with an antique SCO 5.0.7 machine,
trying to get it to do IST/IDT switching done right. You can take the
following wither as a helpful advice or a funny horror story of "how not
to do things" :)

First, I went to the huji FTP, but there were timezone updates for all
OSs other than SCO. I could not find any timezone files on the system
and no real cocumentation was to be found, so I assumed it's
hard-compiled into the libc or something (the only help the late SCO ״¥ad
to offer was a patch package from 2007 which for many reasons was too
invasive a solution.

Luckily I discovered the TZ variable can be a one-line zonefile on its
own! having used GNU machines with /etc/localtime and
/usr/share/zoneinfo/ I never bothered to even look for this kind of a
solution...

SCO has /etc/TIMEZONE, and the "man F timezone" works on my Debian as
"man timezone" as well. here's the new, self-explaining /etc/TIMEZONE I
wrote for them:

#       Set timezone environment to default for this machine
## old way (no automatic change)
# TZ='IST-2'
## This works for Israel in 2009. needs to be changed in 2010!
TZ=IST-2IDT-3,J86/2:00:00,J270/2:00:00

# If you look at the man page for this file (man F timezone), it is all
# explained. The new DST begins at 2:00 AM on the 86th day of the year
# 27th of March and ends at 2:00 AM on 27th of September or the 270th
# day, That's expressed in TIMEZONE as
# "Mmonth.week.day/time,month.week.day/time" in SANE countries, but not
# in ISRAEL, we are too smart for that... The dates DST starts and ends
# on are too random for one rule, so I use the specific day with Jday.
# to calculate the day-of-year, ssh to a GNU machine and use: date -d
# "sep 27 2009" +%j (and you will get 270) You could leave off the
# "/2:00:00" because 2:00 AM is the default.

# NOTE! once you are nearing December 2009 it's time to comment the
# TZ above and uncomment the next one, then REBOOT (annoyingly!)
# so all the processes get the right environment.
# It's that "simple"...
#
# BTW, times for switching IST/IDT are published here (true to 2009)
# http://www.moin.gov.il/Apps/PubWebSite/PageByItem.nsf/PrintTopicPage?OpenAgent&topic=6PMGZN2_2_6SVEPE2
 # search moin.gov.il again when these run out:

##2010: 26.3 till 12.9
#TZ=IST-2IDT-3,J85,J255

##2011: 1.4 till 2.10
#TZ=IST-2IDT-3,J91,J275

export TZ




More information about the Linux-il mailing list