Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Local time zone must be set -- kernel options needed?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Sun Feb 03, 2013 1:51 am    Post subject: Local time zone must be set -- kernel options needed? Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Feb 03, 2013 1:59 am    Post subject: Reply with quote

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.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Sun Feb 03, 2013 5:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Feb 03, 2013 11:56 am    Post subject: Reply with quote

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
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Sun Feb 03, 2013 6:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sun Feb 03, 2013 7:38 pm    Post subject: Reply with quote

Does date print correct time and timezone?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
SamuliSuominen
Retired Dev
Retired Dev


Joined: 30 Sep 2005
Posts: 2133
Location: Finland

PostPosted: Sun Feb 03, 2013 8:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Sun Feb 03, 2013 10:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Mon Feb 04, 2013 12:01 am    Post subject: Reply with quote

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 :oops:
_________________
Good luck :wink:

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21496

PostPosted: Mon Feb 04, 2013 12:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum