Setting date correctly for my time zone

Setting date correctly for my time zone

Post by Tazber » Sun, 31 Dec 1899 09:00:00



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.

 
 
 

Setting date correctly for my time zone

Post by lcs3.. » Sun, 31 Dec 1899 09:00:00




Quote:> 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.

set the system's clock to UTC (or GMT if you prefer;).  Each user,
including root, can use whatever time zone they want by setting the
environment variable TZ (eg 'export TZ=EST5EDT' - there should be a
file somewhere on your disc called tztab that'll show you all the
possibilities) in their .login, .cshrc, .bashrc, .profile, whatever
the mother of all linux resource files is these days...

To see how this works, open a terminal and type 'export TZ=EST5EDT'
and then 'date'.  Then try 'export TZ=CST6CDT' and 'date'.  They
should disagree by an hour.  Last, try 'export TZ=UTC0' and date.
The time you get is the time your system clock is set to. If it's
not EDT + 4 hours, change it with 'date...' or ntpdate, etc.

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

 
 
 

Setting date correctly for my time zone

Post by Gregory D. Horn » Sun, 31 Dec 1899 09:00:00


Try synching your clock with the atomic clock at the Naval Laboratory or a
similar facility.  Search the web on "clock synchronization".

> 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.

 
 
 

Setting date correctly for my time zone

Post by Bill Unr » Sun, 31 Dec 1899 09:00:00



Quote:>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

No. The best solution is to get chrony, an ntp suite which also handles
the hardware clock and time differences between the hardware clock and
the system. (Ie keeps a file which tells it how the hardware clock is
with respect to true time.)

Quote:>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.

The time that Linux uses is always UTC, and linux corrects that for the
timezone you are in. The hardware clock can be in any time, as chrony
will keep track of the difference between the hardware clock and UTC.

Quote:>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

Not the right way to go.

Quote:>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?

That is the normal standard Linux "solution" to this problem. IN fact
since it is an integral part of Linux, solution is not the right term.
It is how Linux operates.
 
 
 

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. FastTrack Server 2.0 Problem

3. how to set time and time zone correctly?

4. Scribe, GML

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

6. Editting filter for masquerading

7. Help! OS/2--Linux Partition Woes!

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

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

10. NEED HELP SETTING TIME ZONE USING DATE COMMAND

11. setting the time zone for `date'

12. Redhat 6.0 Time Zone or Date Problem