msc_wers@jhunix.UUCP (04/06/87)
Help! My computer (an AT&T 3b2) doesn't know that we've changed the weekend for the Standard/Daylight time. How can I convince it we are now in EDT and not EST? I'd appreciate e-mail responses. -Ed Scheinerman (msc_wers@jhunix)
mwh@jhunix.UUCP (04/06/87)
In article <4646@jhunix.UUCP> msc_wers@jhunix.UUCP (Edward R Scheinerman) writes: >My computer (an AT&T 3b2) >doesn't know that we've changed the weekend >for the Standard/Daylight time. How can I convince it >we are now in EDT and not EST? > Since this applies to all vanilla System V implementations, I'll respond here. SysV sets timezone by looking at the TZ environment variable. The format of the variable is <3letter timezone name><hours from Greenwich><3 letter timezone name> The first timezone stands for "standard" time, the second for "daylight savings" time. So the normal commands in /etc/profile to set TZ should be TZ=EST5EDT export TZ The operating system only knows about 1 time format - seconds from 1969 in the GMT zone. Various library routines (see ctime(3)), NOT the kernel, adjust the zone by the value of TZ to give you the corrected time (e.g., the output of the date command). These routines assume that from the last weekend in April to the last in October each year that the time should be adjusted, and the second timezone in the TZ variable be used as a label. Unfortunately, the feds changed this recently, creating a slight problem with wiring in DST changes. To get around this, one must set TZ to the following now TZ=EDT4 export TZ and change it back to normal on the last weekend in April, as follows TZ=EST5EDT export TZ These commands should be put in /etc/profile, or something that is sourced from that script, such as /etc/TIMEZONE. mwh
mjb@hoosier.UUCP (04/07/87)
In article <4647@jhunix.UUCP> mwh@jhunix.UUCP (Michael Hrybyk) writes: >to the following now > >TZ=EDT4 >export TZ > >and change it back to normal on the last weekend in April, as follows > >These commands should be put in /etc/profile, or something that is >sourced from that script, such as /etc/TIMEZONE. > >mwh Actually, you don't have to change it back until october, as long as it is before the daylight rules end. Also, on our HP-UX systems, which are derived from SYS V, the files /etc/{rc, profile, csh.login, inittab} all have explicit refs to the TZ var. What a pain! mjb. --------------- Disclaimer? Why? What's wrong wid DAT claimer? mjb%hoosier@cs.utah.edu
peter@citcom.UUCP (04/07/87)
In article <4647@jhunix.UUCP>, mwh@jhunix.UUCP (Michael Hrybyk) writes: > One must set TZ to the following now > TZ=EDT4 > and change it back to normal on the last weekend in April, as follows > These commands should be put in /etc/profile, or something that is > sourced from that script, such as /etc/TIMEZONE. Thanks for the help; this worked out real well for me. We did not have the option of changing GMT locally. Let me add that on our SCO Xenix, you have to edit /etc/default/login in addition to /etc/rc, /etc/profile, /etc/login and all users login scripts. -- Peter Klosky, Citcom Systems (materiel de telecommunications) seismo!vrdxhq!baskin!citcom!peter
guy@gorodish.UUCP (04/08/87)
>Also, on our HP-UX systems, I believe that some HP-UX systems, at least, handle DST correctly - they load the rules from a file - so you can fix it that way. >which are derived from SYS V, the files /etc/{rc, profile, csh.login, >inittab} all have explicit refs to the TZ var. The "/etc/TIMEZONE" file is a relatively recent addition to S5; it wasn't in the VAX version of S5R2, which is what a lot of S5R2-derived systems were based on.
kdavis@lll-crg.arpa (04/09/87)
I have a different 3b2 timezone problem. When a crontab is run it reverts to EST time even though the clock is set for PST. TZ is passed correctly through /etc/password and when logging in as root, etc. the date command is correct but when running crontabs it is 3 hours off. Anybody tell me what gives? ----- Ken Davis, W6RFN Letterman Army Medical Center - Presidio of San Francisco UUCP: {lll-crg,dual,ptsfa,hplabs}!well!lamc!kdavis ARPA: kdavis@ilcn-letterman.ARPA GENIE: kdavis
aiv@euraiv1.UUCP (04/10/87)
In article <6807@brl-adm.ARPA>, well!lamc!kdavis@lll-crg.arpa writes: > I have a different 3b2 timezone problem. When a crontab is run it > reverts to EST time even though the clock is set for PST. TZ is > passed correctly through /etc/password and when logging in as root, > etc. the date command is correct but when running crontabs it is 3 > hours off. Anybody tell me what gives? > Hmmm, this looks like the problem I encountered a couple of months ago; by looking at the source I saw that the TZ-environment variable was not passed on to the process cron fork'ed. I just added TZ to the list of var's that were passed (PATH, HOME and SHELL, if I remember correctly) and since then things have worked fine around here. So, if you have source you can do the same (I can send you a diff if you want me to but as I'm not quite sure about the legal consequences of posting it, I won't do that now [replies appreciated]) and otherwise start calling your local AT&T-support centre. Anyone knows if this was solved in release 3.0 ? (we have a 3B2 here running rel.3.0 but I don't have time to try things now) (configuration: AT&T/Olivetti 3B2/300, 2Mb mem, 32+74Mb disk, System V rel 2.0) Eelco van Asperen. -----------------------------------------+------------------------------------- Erasmus University Rotterdam |uucp:mcvax!{eurifb,olnl1}!euraiv1!aiv Fac. of Economics, Computer Science Dept.|earn:asperen@hroeur5 PO.box 1738 / 3000 DR Rotterdam | T H E N E T H E R L A N D S |(this space intentionally left blank) -----------------------------------------+-------------------------------------
metro@asi.UUCP (04/11/87)
In article <6807@brl-adm.ARPA>, well!lamc!kdavis@lll-crg.arpa writes: > I have a different 3b2 timezone problem. When a crontab is run it > reverts to EST time even though the clock is set for PST. TZ is > passed correctly through /etc/password and when logging in as root, > etc. the date command is correct but when running crontabs it is 3 > hours off. Anybody tell me what gives? > > ----- > Ken Davis, W6RFN Yes, on the cron line in which you want to use the date command, you must preceed it with a call to /etc/TIMEZONE. Since /etc/TIMEZONE sets the environment parameter TZ, you have to invoke it with the shell "." command. Example: 59 23 * * * pc=\%; . /etc/TIMEZONE;/bin/cp /etc/wtmp `/bin/date "+/usr/adm/wtmp/wtmp.${pc}y${pc}m${pc}d"`; /bin/cat /dev/null >/etc/wtmp Is our entry for root which rolls out one days worth of /etc/wtmp data to a file named "/usr/adm/wtmp/yymmdd" where yymmdd is 870401 for April 1, 1987. -- Metro T. Sauper, Jr. Assessment Systems, Inc. Director, Remote Systems Development 210 South Fourth Street (215) 592-8900 ..!asi!metro Philadelphia, PA 19106
guy@gorodish.UUCP (04/12/87)
>I have a different 3b2 timezone problem. When a crontab is run it >reverts to EST time even though the clock is set for PST. TZ is >passed correctly through /etc/password I presume you mean "through '/etc/profile'" here. More correctly, it is passed correctly when a user's login shell is "/bin/sh". However, if you have a user whose login shell is, say, some specialized application, or "/usr/lib/uucp/uucico", or "/bin/csh", it won't get passed correctly. >but when running crontabs it is 3 hours off. TZ probably wasn't set correctly in the "/etc/rc" script or whichever such script started "cron" up. You have to make sure it's set at the beginning of "/etc/rc", "/etc/brc", etc., etc.. This, and the problem listed above, are reasons why if a system requires TZ to be set for every process "/etc/init" should set it.
honzo@4gl.UUCP (Honzo Svasek) (04/13/87)
In article <6807@brl-adm.ARPA>, well!lamc!kdavis@lll-crg.arpa writes: > I have a different 3b2 timezone problem. When a crontab is run it > reverts to EST time even though the clock is set for PST. As far as I remember (it's been a while since I've installed some 3b2's, the only thing you'll have to do is: set the TZ and export it before you start the cron (in /etc/rc) -- I_I( _ UUCP: ..mcvax!honzo@4gl I I ) Honzo Svasek @ 4GL Consultants b.v. FIDO: Honzo Svasek @ 500/333
galen@pdp.cs.OHIOU.EDU (Douglas Wade Needham) (04/13/87)
Even better yet, let's write our congressmen and tell them what we think of their ideas concerning time changes. -- douglas wade needham #include <disclamer.h> I personally think DST is a communist plot to confuse the free world 8) 8) (I don't like it at all!!! - a disgruntled Amatuer Astronomer...) -- ----S----N----A----R----K----S----&----B----O----O----J----U----M----S---- Douglas Wade Needham (614)593-1567 (work) or (614)597-5969 (Home) Electrical Engineering Dept., Ohio University, Athens, Ohio 45701 UUCP: ...!cbatt!oucs!galen ** Smart Mailers: galen@pdp.cs.OHIOU.EDU