Resetting clock local time.
OK, I have tried repeatedly to reset my clock on my machine in Knoppix and cannot find anything that isn't dated and doesn't seem to work. I know that it has got to be fairly simple, but, can't find the right proceedure.
Currently my clock is like 8 hours out of sync with the actual time(US, Pacific), and I have a 24 hour clock and want a Twelve.
So, what is the proceedure for resetting the clock permanantly?
Thanks.
Resetting clock local time
Quote:
Originally Posted by
Werner P. Schulz
- Set BIOS time to UTC (= Greenwich Time)
- Edit "tz=..." (my posting #3)
- right-mouse-click on the clock in the panel
...
- read the man-page strftime
- edit the string from "Clock Format" as you need
Not feasible, since I already have a Debian 6.0.3 system, it resets the bios according to my localisation values set there, aided by ntpdate. So you have to please suggest another alternative. I have tried TZ cheatcode but that does not work either. I had also run tzselect (=asia/kolkata) here in knoppix, but that too does not work.
Resetting clock local time
Why configure crontab? My system automatically updates the time when I log in to the internet. The ntpdate client listens to the network time servers by itself.
I don't use windoze, so I would not be interested in its registry codes.
Okay, this is one thing that we have got to look into in Knoppix.:)
But that the BIOS is updated by ntpdate is absolutely confirmed. In doze, if you change time the BIOS time is affected too.
An heretical lazy man's approach to Linux time-keeping.
.
I have a nice Dell laptop which came equipped with Windows 7.
I rarely use Windows 7, but it allows the laptop to be very close
to 'Observatory time' since it syncs up my hardware clock with an
ntp server every time it IS used. I also corrects for daylight
savings time, if allowed a peek at the internet. The hardware
clock in question is set to local Eastern US time. I also set
my Knoppix desktop to local 12-hour am/pm format.
I don't use ntpdate or any other Knoppix time correction.
The consequences of this are two as far as I can tell.
1. The result of a date command will erroneously append UTC to
the otherwise very nearly correct local time.
2. There is a small error, currently about 15 seconds, which I
observe by occasionally checking against the USNO.
See: http://tycho.usno.navy.mil/simpletime.html.
If I wanted to tweak the small error, I could spend a few
minutes with Window 7.
If I wanted to tweak the erroneous UTC, I could use an alias
date="date | sed 's\UTC\EST\'" or date="date | sed 's\UTC\EDT\'"
I rarely find the need to do either.
Nor do I care to disturb my Windows 7 which works ok for what it is.
Resetting clock local time
Quote:
Originally Posted by
Werner P. Schulz
Why not?Why do you think so? From man ntpdate:
Because I have seen that happening with my BIOS :) Let us not be hasty. We can solve this issue universally if we think hard.
Resetting clock local time
Quote:
Originally Posted by
Werner P. Schulz
Please tell us the output from
Code:
cat /proc/driver/rtc; date
This one is from the Knoppix system: cat /proc/driver/rtc; date rtc_time : 08:14:09
rtc_date : 2013-01-29
alrm_time : 00:00:00
alrm_date : 2013-01-30
alarm_IRQ : no
alrm_pending : no
update IRQ enabled : no
periodic IRQ enabled : no
periodic IRQ frequency : 1024
max user IRQ frequency : 64
24hr : yes
periodic_IRQ : no
update_IRQ : no
HPET_emulated : yes
BCD : yes
DST_enable : no
periodic_freq : 1024
batt_status : okay
Mon Jan 28 21:44:09 EST 2013
Resetting clock local time
For my Debian system:
rtc_time : 08:43:18
rtc_date : 2013-01-29
alrm_time : 00:00:00
alrm_date : ****-**-**
alarm_IRQ : no
alrm_pending : no
24hr : yes
periodic_IRQ : no
update_IRQ : no
HPET_emulated : yes
DST_enable : no
periodic_freq : 1024
batt_status : okay
Tue Jan 29 08:43:18 IST 2013
Resetting clock local time
Quote:
Originally Posted by
Werner P. Schulz
This value is wrong; did you write it manually?
No, I pasted without putting a line break between the code and output (i.e., Enter Key) :)
Quote:
Originally Posted by
Werner P. Schulz
This value is wrong; did you write it manually? Now, what's the output from
within your Debian and Knoppix?
This part is already settled (please remember to visit my earlier posts). My debian setting is Asia/Kolkata.
My knoppix setting resets itself to the settings for usa after every boot:
Quote:
Originally Posted by
rajibando
What I did was ... every time I boot the time is reset to that of the USA, ...
and
Quote:
Originally Posted by
rajibando
... I installed ntp, ntpdate, etc., and then used this application to set date time. But whatever I set is undone the next time I boot...the localisation I set remains as of India between powerdown and powerup.
Resetting clock local time
To be precise, the Knoppix time is:
Quote:
knoppix@Microknoppix:~$ cat /etc/timezone
Output:
Resetting clock local time
The problem lies with the package: time-admin It can't store date-time settings, at least in my copy of Knoppix.
Resetting clock local time
Quote:
Originally Posted by
rajibando
The problem lies with the package: time-admin It can't store date-time settings, at least in my copy of Knoppix.
What I meant was in between shutdown and booting.
You say,
Quote:
Originally Posted by
Werner P. Schulz
Knoppix uses only the value of "tz=..." of the Kernel line and other settings within "/etc/timezone" will be overwritten.
I have tested with tz in the kernel line, but knoppix does not use that in the subsequent boots. Remember my posting,
Quote:
Originally Posted by
rajibando
... I have tried TZ cheatcode but that does not work either. I had also run tzselect (=asia/kolkata) here in knoppix, but that too does not work.
What it does is it treats my BIOS time as UTC and then calculates New York time. You say,
Quote:
Originally Posted by
Werner P. Schulz
Oh, no! "time-admin" can store your settings and you can see it immediatly with "cat /etc/timezone" But Knoppix is a Live System and therefore it uses another way => '/etc/init.d/knoppix-autoconfig' => '# Set timezone'
Where is this line? My kernel line is:
Quote:
linux (hd1,1)/boot/isolinux/linux root=/dev/ram rw ramdisk_size=100000 lang=us apm=power-off nomce tz=/Asia/Kolkata
Resetting clock local time
Yes, done! The error was in using the capital TZ, following earlier post. whereas it would be tz in kernel line, and then using the ntp daemon to fix the time and date. Thanks for staying on the issue with me.
Resetting clock local time
Quote:
Originally Posted by
Werner P. Schulz
Knoppix...uses another way => '/etc/init.d/knoppix-autoconfig' => '# Set timezone'
Please elaborate!
Regards