Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: ACRizona on August 21, 2010, 11:38:37 PM
-
The soldered-in battery is dead and the Mboard is too old for surgery. :'(
The old BIOS defaults to Jan 1, 2000 12:01:01 AM so,,, by the time it boots and I get to terminal; date reports some random??? date & time +- many hours from 1/1/2000 !
I installed ntpclient and tried;
sudo nptclient -s -c 1 -t -h local.veryfast.time.server
Now the date is correct, but the time is screwy. Repeating the command results in an even screwier time. I suspect some weird mathematics here.
I tried chrony... I flipped my sand-clock over several times before I finally un-installed that thing !
I typed the numbers according to my sun-dial into cpanel Date/Time and all is well.
Surely there is a simple script that I can add to the boot procedures that can set the proper date & time.
Any help is welcomed. This old Wang computer thanks you.
-
And this little script is: getTime.sh
It's part of the Core so you won't need any extension for it to run. The only caveat is that the time source it utilizes might not provide the fractions of a second precision that ntp is able to provide.
-
Great ! (... how many times I've searched for gettime ... )
Erk ! Its several hours ahead of me !
Can I set that in GRUB script tz=GMT-7 ?
Where do I add getTime.sh in proper start-up sequence ?
Thanks for your help.
-
or you could also try
sudo rdate my.timeserver.com
using option -p would show you how the time would be set without actually setting it ;)
If your clock is supposed to be kept in local time, you also have to add boot param 'noutc'
-
Can I set that in GRUB script tz=GMT-7
Note that "GMT-7" is the opposite to what you'd expect, it would more usually be named "GMT+7"...
-
No matter what I put in grub menu.lst ; noutc and/or tz=gmt-7
when it boots, I see:
Booting TinyCore
Setting language to C Done
Setting TimeZone to UTC Done
???
getTime.sh and sudo rdate -s both set the date 8 hours ahead of local time.
http://forum.tinycorelinux.net always displays the correct time :)
-
Perhaps it's the use of lower case instead of caps for tz?
Is your hwclock supposed to be in utc or local or errrr, when you go into BIOS, does it work at all and can it be set?
-
tz=GMT-8 or tz=gmt-8 or tz=UTC-8 ,,, same results.
The Mboard clock works fine. Without a battery,
the clock always starts at Jan 1, 2000 00:00:00 AM.
I added getTime.sh and hwclock -w to bootlocal.sh so when it boots, the true UTC date & time are set.
Now... I need the LocalTime !
-
Hmm, it looks like you are going about setting your local timezone in the wrong way. As there are already several threads regarding this, I'd like to point out just a few contributions of myself towards a better understanding:
- a detailed explanation (http://forum.tinycorelinux.net/index.php?topic=5017.msg27012#msg27012) of the TZ variable
- a few different options of where to set the TZ variable (http://forum.tinycorelinux.net/index.php?topic=2421.msg29251#msg29251) (this should also give you some idea on how to temporarily test it)
So, if you live in an area of the Mountain Time that does not use daylight savings (e.g. Phoenix) your TZ value would be MST7, and where DST is used (e.g. Denver) the setting would be MST7MDT,M3.2.0,M11.1.0
-
Several threads ??? There are 5 PAGES of them when you search the forum for TZ.
I know, I have read them all.
I have found a solution elsewhere that uses rdate and hwclock to set the exact Phoenix time.