run time date and syslog date/time conflict

run time date and syslog date/time conflict

Post by Ken Barlo » Fri, 17 Jan 1997 04:00:00

Hi all, I have a linux 2x machine and a 1.3.57 machine
that both have the same problem.

1:  The cmos time is set to local
2:  The TZ is correct

BUT, the date<enter> displays a number several hours off
cmos time, though syslogd enters cmos time in the logs

Thanks in advance for any direction you can provide!

Ken Barlow

k barlow at acccorp dot com


run time date and syslog date/time conflict

Post by B.A.McCau.. » Sat, 18 Jan 1997 04:00:00

>Hi all, I have a linux 2x machine and a 1.3.57 machine
>that both have the same problem.

>1:  The cmos time is set to local
>2:  The TZ is correct

What do you mean by "The TZ is correct"?

Are you talking about the TZ environment variable?  If so you may like
to consult the FAQ entry "How do I set the timezone ?"

As a rule of thumb it's *never* a good idea to simply say "foo is
correct".  It is always better to *show* us that which you think is
correct.  If it is correct you will have wasted neglegable effort.
Either way you you'll have avoided sending people on a wild

The TZ variable should usually not be set and is only used to override
the timezone on a per-process basis (handy if you like to have a row
of international xclocks or if you have users logged in from other
parts of the world).  The TZ variable is definitely *not* used to
implement the system default timezone (that's done by

Is the system clock actually right? (i.e. does "TZ=GMT date" actually
return the true GMT time?)

If the clock is really wrong and the timezone really is correct it is
possible that "syslogd" and "clock" are getting run before /usr is
mounted.  To fix this make a copy of "localtime" then unmount /usr and
put /usr/lib/zoneinfo/localtime on the root partition so that the
correct information is found there even w/o /usr mounted.


 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)

.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
 # ll  l\\  ~~~~ ~   ~ ~    ~ |


1. date/time of a file compare with current date/time


I hope i can drop my question about Linux shell programming here?

I'm writing a script in bash to find files. I'm using the slocate
programm, which is being runned every hour using a cron job, to create
it's database.

Now i want to know how long it is ago that the database has been
recreated. Zo i need to check the date and time from that file and
compare it with the current date and time. I know there must be easy to
do but i can't find the trick to do it.

Maikel van Gorkom

Sent via
Before you buy.

2. Acard AEC 6712UW scsi card

3. System date and file dates not showing in same time zone

4. Kernel config, SHMMAX, SHMMIN, ...

5. Archiving files in "date folders" based on date and time file generated

6. The Crash and "nt"

7. Epoch time - Date Time in DDMMYYHHMISS ( From-To conversion ) using standard utility

8. Kentech vlb ide KJD-IDEIOVLB jumper setting?

9. date reset as UTC from time to time RH6.0

10. How to convert time/date info into unix clock time

11. date and time of compile time (__DATE__ in Borland C++

12. DATE / TIME with f2c (Was: Re: Timing Routines)

13. converting date and time to unix time