Top shows GMT time i.s.o MDT time!

Top shows GMT time i.s.o MDT time!

Post by Andrei Lenke » Sun, 25 Oct 1998 04:00:00



Hi!

I'm runnig RH5.0 upgraded to 2.0.35 (SMP, 2xPII 333) and most (not all)
of the errata upgrades.

Whenever I run top on my machine it shows GMT time in stead of  my local
time which is MDT. Date shows the correct time, see below.

I've searched

top version is;
procps version 1.12

Date shows:

Sat Oct 24 14:54:28 MDT 1998

Top shows:

  8:54pm  up  3:51h,  0 users,  load average: 0.00, 0.00, 0.00
30 processes: 29 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  0.0% user,  0.9% system,  0.0% nice, 99.1% idle

/etc/sysconficg/clock is:
UTC=false
ARC=false

I've searched DejaNews but couldn't find anything (There's a lot of *
on "top"
and nothing on "GMT" so there MIGHT :( be something about this in there)

Any help would be greatly apreciated.

Thanks,
Andrei

 
 
 

Top shows GMT time i.s.o MDT time!

Post by Ron Hous » Wed, 28 Oct 1998 04:00:00



> Hi!

> I'm runnig RH5.0 upgraded to 2.0.35 (SMP, 2xPII 333) and most (not all)
> of the errata upgrades.

> Whenever I run top on my machine it shows GMT time in stead of  my local
> time which is MDT. Date shows the correct time, see below.

You might be having another symptom of the problem I had. I found DOS
file dates out by ten hours (my timezone difference). The fault was that
the latest RH (mine was 5.1) didn't set the kernel's internal timezone
variable. Here is a program that did the trick for me. I am ten hours
ahead (east) of GMT; you will have to adjust the code for your TZ. It
should be put in your init script just after the clock setup section and
run as root. Don't try to leave out one of the two calls to
settimeofday.

#include <sys/time.h>
#include <unistd.h>

int main( int argc, char *argv[] )
{
        struct timezone tz;
        struct timeval tv;
        gettimeofday( &tv, &tz );
        if (tz.tz_minuteswest == 0) {
                settimeofday( NULL, &tz );
                tz.tz_minuteswest = -10 * 60; /* or whatever */
                tz.tz_dsttime = 0;
                settimeofday( NULL, &tz );
        }
        return 0;

Quote:}

Let us know if this works.

--

You can only be right if you have the courage to be wrong.

 
 
 

1. How to get ls to show local time and not GMT

Stupid thing I can't figure out. My RD 6.0 systems display the local
time when I use 'date', but the date displayed by 'ls -l' is the GMT
time.  Is there a way to change this?

--
Steve Simons                                    "Yeah, I can do that"

Sent via Deja.com http://www.deja.com/
Before you buy.

2. xterm setuid problems.

3. timed (time daemon) and GMT

4. Linux kernel, TIME.H

5. GMT-time & Samba an a time-server

6. zImage; Error while 'make'ing

7. Convert local time to gmt time without using TimeZone Env variable

8. WindowMaker 0.51 startup performance patch

9. convert UT time in local time / local time in UT time

10. time time time how can I tell the time

11. top doesn't show time, cpu usage

12. Daylight time (label) but standard time (time)