Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#149694 - 21/03/2003 16:36 Clock and timezones in Linux
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
Ok, we have scripts here that run our Point of Sale system for our stores that pull the date from the 'date' command in Linux as well as SQL statements that use the sysdate() function. Now, for some odd reason for the stores on the East Coast the sysdate(), the 'date' and 'hwclock' commands, and the crontabs on the system are all off from eachother. The 'date' and 'hwclock' commands return the correct time, sysdate() returns current PST time (three hours behind), some crontab's run three hours late (i.e. it is set to run at 7am EST, and it runs at 10am EST). Also, the daytime service from one machine to another (phyisically in the same place) returns PST time, even though the timezone is set to EST on both machines.

Now I've checked everything I can think of: /etc/localtime link, TZ environment variable, hwclock, date, etc.

Anyone have any ideas? It's giving me a headache. Thanks in advance.
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#149695 - 21/03/2003 16:53 Re: Clock and timezones in Linux [Re: ricin]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
If you're sure /etc/localtime is set correctly and there are no bogus TZs set anywhere, try rebooting. It's the only real way to redistribute the correct time zone to all of your processes.
_________________________
Bitt Faulk

Top
#149696 - 22/03/2003 01:14 Re: Clock and timezones in Linux [Re: wfaulk]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
Yep, that's what it was. I couldn't reboot at the time because the store was still open. I planned to try a reboot as soon as they were closed to see if it had any effect. I think just restarting mysql, xinetd (for the daytime service), and crond would have done it as well.
_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#149697 - 22/03/2003 10:24 Re: Clock and timezones in Linux [Re: ricin]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
If those processes were the only ones whose time zones you cared about, then, yeah, you could have done that. The real problem comes from those processes that you can't restart and that are children of those processes. These are mostly the stuff in inittab and login processes. ISTR that the Linux kernel does something with timezones, too (though I can't think what that could possibly be), and I have no idea how to deal with that.
_________________________
Bitt Faulk

Top