View previous topic :: View next topic |
Author |
Message |
deltamalloc Apprentice
Joined: 18 Jan 2013 Posts: 279
|
Posted: Sun Feb 03, 2013 1:51 am Post subject: Local time zone must be set -- kernel options needed? |
|
|
From https://forums.gentoo.org/viewtopic-t-895802-view-next.html?sid=7144953252f472c760c6adff6f3e38ab I see that I most likely need to enable some option in my kernel.
Quote: |
fixed. My kernel was build with unset timezone.
|
What option is that? I did a few searches online, including in /usr/src/.config to see if I could find something related to "ZONE" or "TIME", but nothing of interest came up. What do I need in my kernel to make this work? (Yes I have my /etc/localtime linked, to /usr/share/zoneinfo/Europe/Oslo.) |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
deltamalloc Apprentice
Joined: 18 Jan 2013 Posts: 279
|
Posted: Sun Feb 03, 2013 5:07 am Post subject: |
|
|
Jaglover wrote: | This is not a kernel option, just make sure your system time is correct at all times, precise time is also a part of security. |
System time is correct, yet I still get the "Local time zone must be set" from uname. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sun Feb 03, 2013 11:56 am Post subject: |
|
|
Technically your time is not correct if the timezone is not set. From Gentoo Handbook:
Quote: | livecd / # ls /usr/share/zoneinfo
(Using Brussels as an example)
livecd / # cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime
livecd / # echo "Europe/Brussels" > /etc/timezone
livecd / # date
Wed Mar 8 00:46:05 CET 2006
|
_________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
deltamalloc Apprentice
Joined: 18 Jan 2013 Posts: 279
|
Posted: Sun Feb 03, 2013 6:42 pm Post subject: |
|
|
Jaglover wrote: | Technically your time is not correct if the timezone is not set. From Gentoo Handbook:
Quote: | livecd / # ls /usr/share/zoneinfo
(Using Brussels as an example)
livecd / # cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime
livecd / # echo "Europe/Brussels" > /etc/timezone
livecd / # date
Wed Mar 8 00:46:05 CET 2006
|
|
I have tried to do this, even after a reboot it still says "Local time zone must be set" in uname. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
SamuliSuominen Retired Dev
Joined: 30 Sep 2005 Posts: 2133 Location: Finland
|
Posted: Sun Feb 03, 2013 8:08 pm Post subject: |
|
|
This example should be enough to demonstrate how it really works
Code: |
# cat /etc/timezone
Europe/Helsinki
# ls -l /etc/localtime
...no such file or directory...
# emerge -1 timezone-data
# ls -l /etc/localtime
-rw-r--r-- 1 root root 1883 Feb 3 22:06 /etc/localtime
|
|
|
Back to top |
|
|
deltamalloc Apprentice
Joined: 18 Jan 2013 Posts: 279
|
Posted: Sun Feb 03, 2013 10:44 pm Post subject: |
|
|
Jaglover wrote: | Does date print correct time and timezone? |
Yes.
Code: |
# date
Sun Feb 3 23:43:00 CET 2013
|
CET is correct for me. The time, date and year is also correct. |
|
Back to top |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Mon Feb 04, 2013 12:01 am Post subject: |
|
|
deltamalloc,
That happened to me with uname a long time ago and I can't recall what the problem stemmed from. I any event it had something to do with zic.
zic has something to to with timezones - man zic
UPDATE: Never mind, I just noticed you already checked that _________________ Good luck
Since installing gentoo, my life has become one long emerge
Last edited by BillWho on Mon Feb 04, 2013 1:17 am; edited 1 time in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21633
|
Posted: Mon Feb 04, 2013 12:20 am Post subject: |
|
|
The time data shown in uname is built into the kernel when you compile it. Therefore, if your date command was wrong at the time you built the kernel, your uname output will be wrong indefinitely for that kernel. If this bothers you, build a new kernel now that your date command produces the correct output, and use that kernel instead. |
|
Back to top |
|
|
|