tjr@cbnewsc.ATT.COM (thomas.j.roberts) (05/10/89)
I have just inherited a SUN 3/60 workstation, networked to a SUN 4 fileserver. Unfortunately, the timezone is PDT, and I live in CDT. How can I change it?? [On System V, setting the TZ variable works everywhere, here on the SUN it only works in the date command.] I have been unable to find it in any manuals, except for settimeofday(2); do I really have to write my own C program to set the timezone???(!). I have heard a rumor that I need to re-make the kernel. I could find no mention of timezone in the "reconfigure the kernel" setcion of the Administrator's manual. There is a program called "setup", which is claimed to be useful to install new software; might it also set the timezone? (I am afraid to start it up without instructions). "uname -a" gives: snuffy snuffy 4.2BSD vm sun We have SUN release 3.5 manuals, and I assume the software is at least that recent (but I forgot what it typed when it booted, and I cannot reboot without canceling this posting, and cannot figure out how to get it to tell me its version - sigh). Any help will be greatly appreciated. Tom Roberts att!ihnet!tjr
nvt9001@belvoir-emh3.army.mil (DoN Nichols) (05/12/89)
I tried posting this directly to tjr, but my mailer didn't like his address. tjr@cbnewsc.att.com asked: > I have just inherited a SUN 3/60 workstation, networked to a SUN 4 fileserver. > Unfortunately, the timezone is PDT, and I live in CDT. How can I change it?? I had the same problem on an orphan system based on V7 unix and the MC68000 microprocessor. I lived with it for a while, able to fix anything to which I had source by using a new time library which was posted to the net. Of course I didn't have source to everything :-) A recent posting of an update to the timezone library led me to poke around in the kernal with nm. I found a variable named "_timezone", if I remember properly. I went in with adb, and examined it (it is a long on my system). As expected, it had the value of 480 (8*60) (number of hours west of GMT). I changed it to 300 (for EST, where I am). This brought the old routines to the east coast, but for a few weeks there was still a discrepancy between code using the new library, and that using the old. (Reason: There was a change in the starting date of daylight savings time. The old routines were waiting till the *LAST* sunday in April, while the new ones knew that it was the *FIRST* sunday in April. :-). Try using adb to just change the value in /dev/kmem first (the core file for adb), and see if it is correct. If so, change it in /unix (or whatever is used as the kernal in the Sun), so you will still be correct after reboot. Be sure to make a backup copy of the kernal under another name first, in case things really get screwed up. ----- If you want, contact me and I will attempt to send you the new library routines, but they are probably available from a comp.sources.unix archive near you. name is localtime3. Sorry, but I can't. I couldn't post directly to you. If you can come up with an address which my mailer on milnet will swallow, I'll try. ----- Good Luck Don Nichols <nvt9001@belvoir-emh3.army.mil>