baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: James Miller <jamtat AT mailsnare.net>
- To: baslinux AT lists.ibiblio.org
- Subject: Re: [BL] System time under bl2
- Date: Tue, 17 Feb 2004 16:30:17 -0600 (CST)
On Wed, 18 Feb 2004, Ron Clarke wrote:
> Hi Folks,
>
> Can anyone tell me how to set the system (date and) time under
> BasicLinux 2.1 ?
>
> This machine has it exactly right under DOS, but when booted
> to BL2 the time seems to be quite a few hours adrift.
>
> Do I have to fix this with some kind of time-zone info ?
I went through alot of time tweaking with BL, but unfortunately I don't
have any BL system here to check on what I did. I'll go ahead and recite
some of what I did from memory, hoping others will jump in with
corrections where I may be off. I think you want
-----------------
date -s 00:00:00
----------------
to just set it manually. But BL probably takes its its time from the
hardware clock (BIOS). And yes, in order to get the clock to tell time
correctly in your time zone, you have to tell it your offset from UTC.
This is done via a file I think is called "locale" and is located in /etc,
if memory serves. I could not figure out how to get such a file there
using Slack packages - it's not just a simple text file - so I stole it
from my Debian system where it was part of a much fuller install (an
installation that also involved telling the computer what time zone I was
in). To really be able to fiddle with system time stuff, you'll need some
addtional packages - I think "hwclock" is the main one. If memory serves,
it is part of /a15/util.tgz . I also found on the internet a neat
time-sync script that's really easy to use - it's part of the System Clock
Mini-HOWTO. It syncs the system time with some timeservers (offers some
as examples, but you can enter others closer to you if you'd like) and
can do some other things like sync the system's hardware clock to the
system clock, once you've updated that using the script. It requires the
package netdate - /n6/tcpip1.tgz. Anyway, one of the URL's for the System
Clock Mini-HOWTO is
http://www.loblolly.net/~rddecker/helppages/MiniHOWTOS/systemclock/systemclock.htm
Here's a relevant excerpt, for those who might be interested in putting
this script on their system(s):
----------------------------------------------------------
The manual entry for netdate suggests creating a shell script for updating
your time using netdate. First do a ls /sbin/timehosts to see if it's
already there..
Otherwise, here is a simple script to do the trick:
# cat /sbin/timehosts
#!/bin/sh
#now to set the system date to the most reliable time server
netdate 129.6.15.28 132.163.4.102 131.107.1.10 207.200.81.113
# see http://www.bldrdoc.gov/timefreq/service/time-servers.html
#now to set the CMOS/hardware clock
clock -w
#or if clock not available try
#hwclock --systohc
Don't forget to chmod 755 /sbin/timehosts to allow it to be written to by
root and executed by all.
Or for a bit more information:
# cat /sbin/setdate
#!/bin/sh
#lets see what the current system date is
echo The current System date and time is
date
echo the CMOS/Hardware clock date/time is
clock -r
#or if clock is not available
#hwclock --show
#now to set the system date to the most reliable time server
netdate 129.6.15.28 132.163.4.102 131.107.1.10 207.200.81.113
#has the system time changed much?
echo The Sytem and CMOS/Hardware clock date/time will be set to:
date
#now to set the CMOS/hardware clock
clock -w
#or if clock not available try
#hwclock --systohc
#for finding other IPs to use for netdate see the below
# see http://www.bldrdoc.gov/timefreq/service/time-servers.html
Don't forget to chmod 755 /sbin/setdate to allow it to be written to by
root and executed by all.
----------------------------------------------------------------
So, the author's created a script called "setdate," made it executable and
put it in his path. When he runs "setdate" as root, it updates the system
time from those timeservers he's specified. You can figure out the rest,
and whether it's helpful to your setup, from the how to.
James
-
[BL] System time under bl2,
Ron Clarke, 02/17/2004
-
Re: [BL] System time under bl2,
James Miller, 02/17/2004
-
Re: [BL] System time under bl2,
3aoo-cvfd, 02/17/2004
- Re: [BL] System time under bl2, Ron Clarke, 02/18/2004
-
Re: [BL] System time under bl2,
3aoo-cvfd, 02/17/2004
-
Re: [BL] System time under bl2,
James Miller, 02/17/2004
Archive powered by MHonArc 2.6.24.