how to set time and time zone correctly?

how to set time and time zone correctly?

Post by Jianlin Cha » Tue, 02 Jul 1996 04:00:00



date returned by "date" on my linux system is always 4 hours behind
the real time, with something like this:
Mon Jul  1 09:37:22 EDT 1996
when the real time 13:37 EDT.

I think that my PC's machine clock is 13:37. It looks that linux think
the machine's time is GMT, thus set the local time (EDT) to 09:37.
How can I make linux think that the machine's time is local time,
rather than GMT?

I also found that just after I started the system, I got:
Mon Jul  1 13:37:22 1996
without the timezone. Shortly I will get:
Mon Jul  1 09:37:22 EDT 1996

if I use "date" to set the new date to "13:37:22", I think that it will
set the machine's clock to "17:37:22". Thus the time within windows and
DOS won't be correct.

Any suggestions? Thanks a lot.

--


Queen's University               Tel: (613) 545-2723 (o)
Kingston, Ontario K7L 3N6             (613) 547-1353 (h)
Canada                           Fax: (613) 545-6463

 
 
 

how to set time and time zone correctly?

Post by Metod Kozel » Wed, 03 Jul 1996 04:00:00


Hello,


> date returned by "date" on my linux system is always 4 hours behind
> the real time, with something like this:
> Mon Jul  1 09:37:22 EDT 1996
> when the real time 13:37 EDT.

> I think that my PC's machine clock is 13:37. It looks that linux think
> the machine's time is GMT, thus set the local time (EDT) to 09:37.
> How can I make linux think that the machine's time is local time,
> rather than GMT?

I guess that in some of your start-up rc scripts you have
a command reading line this:

/sbin/clock -su

That assumes that the CMOS clock is set to UTC time rather
than to local time. You will have to omit that 'u' in command.

Quote:> if I use "date" to set the new date to "13:37:22", I think that it will
> set the machine's clock to "17:37:22". Thus the time within windows and
> DOS won't be correct.

'date' command only set the Linux' system time, not the time
in CMOS. If you haven't got a command like

/sbin/clock -w

in one of your shut-down rc scripts, the change you made
usind command 'date' won't have any effect on the DOS time.

Hope it helps.

--
Metod Kozelj


WWW:    http://www.rzs-hm.si/people/Metod.Kozelj/

 
 
 

how to set time and time zone correctly?

Post by Jianlin Cha » Wed, 03 Jul 1996 04:00:00


Thanks. I found the fix myself by removing -u from clock in rc*
scripts.

: Hello,

: >
: > date returned by "date" on my linux system is always 4 hours behind
: > the real time, with something like this:
: > Mon Jul  1 09:37:22 EDT 1996
: > when the real time 13:37 EDT.
: >
: > I think that my PC's machine clock is 13:37. It looks that linux think
: > the machine's time is GMT, thus set the local time (EDT) to 09:37.
: > How can I make linux think that the machine's time is local time,
: > rather than GMT?

: I guess that in some of your start-up rc scripts you have
: a command reading line this:

: /sbin/clock -su

: That assumes that the CMOS clock is set to UTC time rather
: than to local time. You will have to omit that 'u' in command.

: > if I use "date" to set the new date to "13:37:22", I think that it will
: > set the machine's clock to "17:37:22". Thus the time within windows and
: > DOS won't be correct.

: 'date' command only set the Linux' system time, not the time
: in CMOS. If you haven't got a command like

: /sbin/clock -w

: in one of your shut-down rc scripts, the change you made
: usind command 'date' won't have any effect on the DOS time.

: Hope it helps.

: --
: Metod Kozelj


: WWW:    http://www.rzs-hm.si/people/Metod.Kozelj/

--


Queen's University               Tel: (613) 545-2723 (o)
Kingston, Ontario K7L 3N6             (613) 547-1353 (h)
Canada                           Fax: (613) 545-6463

 
 
 

how to set time and time zone correctly?

Post by Wim Vandeput » Wed, 03 Jul 1996 04:00:00


: I also found that just after I started the system, I got:
: Mon Jul  1 13:37:22 1996
: without the timezone. Shortly I will get:
: Mon Jul  1 09:37:22 EDT 1996

are you sure your /usr/lib/zoninfo/localtime is pointing to the right file?

 
 
 

1. Setting date correctly for my time zone

My linux box (running Debian Slink) is attached to a cable modem and is
acting as a web server, dhcp server and webgate for a couple Win98
boxes on my LAN. The problem I am having is that the clock on my linux
box seems to be quick. Doing a search in some forums, I have come to
the conclusion that I need to use cron to fire off either netdate or
rdate to reset my clock. At least that is what seems to be the best
solution I was able to find. I did some searches on the internet for
some atomic clocks to get the time from, but everything seems to be in
UTC. I am on EST and would like the clock to be set to that.

My questions are, am I on the right track for fixing the problem with
using cron and netdate or rdate to get an accurate time? How do I go
about getting the time to EST? Is there an atomic clock on the east
coast that I can query or do I need to write a script to subtract the 4
hours? Since my linux box is up 24/7, would setting the CMOS clock
using hwclock do me any good (it is my understanding that a reboot is
needed after this is done)? I have seen something about just setting
you clock to UTC and then specifing a time zone on your system, then
when the time on your system is queried it returns the time according
to the time zone you set. Should I look more into this solution?

--
Play hard the body heals!

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

2. 'less' command doesn't work properly in searching strings...

3. How to change oem-logo ?

4. Time zone for BST (British Summer Time)

5. ipchains script question...

6. get local time from the time zone

7. !!!URGENT !!! Printer driver

8. Time Sync across time zones

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

10. time time time how can I tell the time

11. How to set Date/Time zone on Linux?

12. how do I set my time zone ??