-
Getting the timezone correct
Up to now I've been ignoring the fact that when I boot Knoppix 3.4 (2004/.5.17) the local timezone is assumed to be EDT America/NewYork. But I'm trying to get a satellite prediction program working and my timezone has to be correct.
I have determined that my hardware clock is set to local time.
When I boot with the cheatcode:
it makes no difference to the displayed timezone. It's still EDT but should be CST and the /etc/localtime file is also EDT.
I've put some debugging in knoppix.sh and the TZ variable is being set to the correct zone from the tz= cheatcode but it makes no difference.
If I do the following as superuser:
Code:
TZ=America/Regina
export TZ
hwclock -s
the monitor goes weird until I hit a key but then the timezone has been set correctly.
Why doesn't specifying the correct tz= cheatcode set the correct time at boot up and how do I fix it?
Best Wishes
Pete
-
Senior Member
registered user
Greetings from Saskatoon.
It might be KDE using it's default instead of system setting. Try rt clk on the time display & make sure timezone is set for local time. Check also that time is correct after the rest of the world switches to daylight saving time.
-
![Quote](images/misc/quote_icon.png)
Originally Posted by
CrashedAgain
Greetings from Saskatoon.
Greetings from Saskatoon to you too
I was only using America/Regina because there's no America/Saskatoon option.
It might be KDE using it's default instead of system setting.
I set the correct date/time and timezone and then saved configs, which saves /etc/localtime. That combined with specifying tz=America/Regina at the boot prompt should set the correct date/time and timezone but it doesn't.
The date program shows local time (CST) as two hours too early. Something is still forcing EDT when it boots and I can't find it.
Try rt clk on the time display & make sure timezone is set for local time.
It is set for local time but that only affects how the clock is interpreted.
When I'm using the satellite prediction software the thing that counts is that the date program prints out the correct date/time and timezone because it uses the same system calls to get the date/time as the prediction software.
Best Wishes
Pete
-
Found the problem (was - Getting the timezone correct)
There is a bug in the way that the /etc/knoppix-autoconfig script handles the tz cheatcode.
It does not read that cheatcode, and set TZ from it, until after the system clock has been set with the hwclock command.
This block of code:
Code:
KTZ="$(getbootparam tz 2>/dev/null)"
[ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
rm -f /etc/localtime
cp "/usr/share/zoneinfo/$TZ" /etc/localtime
should be moved before this block of code:
Code:
# hwclock uses the TZ variable
export TZ
hwclock $UTC -s
so that the tz= cheatcode will override whatever timezone default was set by the lang= cheatcode.
Best Wishes
Pete (now definitely on CST
Similar Threads
-
By pavel7nl in forum Hdd Install / Debian / Apt
Replies: 3
Last Post: 06-11-2005, 09:57 PM
-
By doclalor in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 04-11-2005, 10:40 AM
-
By lilsirecho in forum Klik
Replies: 4
Last Post: 01-07-2005, 01:44 AM
-
By olivers in forum Hdd Install / Debian / Apt
Replies: 2
Last Post: 10-24-2004, 10:07 PM
-
By alex+ in forum General Support
Replies: 3
Last Post: 12-26-2003, 06:14 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![*Low Usage* Samsung 850 Pro 512GB SSD (MZ-7KE512) 3D V-NAND SATA III 6Gb/s 2.5](/store/img/g/TVcAAOSwXPBiZUjP/s-l225/-Low-Usage-Samsung-850-Pro-512GB-SSD-MZ-7KE512-3D-.jpg)
*Low Usage* Samsung 850 Pro 512GB SSD (MZ-7KE512) 3D V-NAND SATA III 6Gb/s 2.5"
$49.99
![Samsung - S Pen Creator Edition - White picture](/store/img/g/nicAAOSwg8Nl-6GK/s-l225/Samsung-S-Pen-Creator-Edition-White.jpg)
Samsung - S Pen Creator Edition - White
$38.00
![Samsung Galaxy Tab A9+ 11.0](/store/img/g/qbUAAOSw1o1l1Rtt/s-l225/Samsung-Galaxy-Tab-A9-11-0-64GB-Gray-Wi-Fi-Tablet-.jpg)
Samsung Galaxy Tab A9+ 11.0" 64GB Gray Wi-Fi Tablet Bundle SM-X210NZAYXAR 2023
$149.99
![Samsung Chromebook XE350XBA-K05US 15.6](/store/img/g/GBsAAOSwAXVmaIaV/s-l225/Samsung-Chromebook-XE350XBA-K05US-15-6-1080p-FHD-L.jpg)
Samsung Chromebook XE350XBA-K05US 15.6" 1080p FHD Laptop Intel 4GB RAM 128GB SSD
$89.00
![Samsung Galaxy Tab S2 SM-T710 32GB Wi-Fi 8](/store/img/g/doUAAOSwmBtmX-S9/s-l225/Samsung-Galaxy-Tab-S2-SM-T710-32GB-Wi-Fi-8-Android.jpg)
Samsung Galaxy Tab S2 SM-T710 32GB Wi-Fi 8" Android Tablet - Black
$42.99
![Samsung Chromebook 3 4GB 16GB SSD 11.6-Inch Laptop XE500C13-K02US HDMI WIFI picture](/store/img/g/ubUAAOSwBINleyTe/s-l225/Samsung-Chromebook-3-4GB-16GB-SSD-11-6-Inch-Laptop.jpg)
Samsung Chromebook 3 4GB 16GB SSD 11.6-Inch Laptop XE500C13-K02US HDMI WIFI
$39.59
![1 pcs Sticker for SAMSUNG Label Aufkleber Badge Logo 30mm x 6mm Chrome color picture](/store/img/g/S8MAAOSwVAVhch09/s-l225/1-pcs-Sticker-for-SAMSUNG-Label-Aufkleber-Badge-Lo.jpg)
1 pcs Sticker for SAMSUNG Label Aufkleber Badge Logo 30mm x 6mm Chrome color
$2.99
![Samsung - 990 EVO SSD 2TB Internal SSD PCIe Gen 4x4 | Gen 5x2 M.2 2280 picture](/store/img/g/uZYAAOSw4VBmgYHw/s-l225/Samsung-990-EVO-SSD-2TB-Internal-SSD-PCIe-Gen-4x4-.jpg)
Samsung - 990 EVO SSD 2TB Internal SSD PCIe Gen 4x4 | Gen 5x2 M.2 2280
$109.00
![OEM Samsung Galaxy Tab S9 Ultra 14.6](/store/img/g/yzcAAOSwVO1mGCVK/s-l225/OEM-Samsung-Galaxy-Tab-S9-Ultra-14-6-Book-Cover-Ke.jpg)
OEM Samsung Galaxy Tab S9 Ultra 14.6" Book Cover Keyboard, Black, EF-DX915UBEGUJ
$224.99
![Samsung Galaxy Note GT-N8013 16GB Wi-Fi 10.1](/store/img/g/vzgAAOSwvPtmYIn1/s-l225/Samsung-Galaxy-Note-GT-N8013-16GB-Wi-Fi-10-1-Table.jpg)
Samsung Galaxy Note GT-N8013 16GB Wi-Fi 10.1" Tablet- Tablet Only
$50.98