Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to set TIMEZONE variable to /etc/conf.d/clock ?(SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sat Feb 17, 2007 1:33 am    Post subject: how to set TIMEZONE variable to /etc/conf.d/clock ?(SOLVED) Reply with quote

What do I add;
TIMEZONE="America/New_York"


Last edited by comprookie2000 on Sat Feb 17, 2007 9:59 am; edited 1 time in total
Back to top
View user's profile Send private message
ghutzl
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2005
Posts: 123
Location: Germany

PostPosted: Sat Feb 17, 2007 2:20 am    Post subject: Reply with quote

Do

Code:
ls /usr/share/zoneinfo


and select the one that is appropriate for you. There are directory names and the actual zoneinfo files.

Maybe US/Eastern is ok for you?
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sat Feb 17, 2007 3:29 am    Post subject: Reply with quote

In the new timezone-data you need to set TIMEZONE in /etc/conf.d/clock
I would like to know the format
I did this;
Code:

# ls /usr/share/zoneinfo

# cp /usr/share/zoneinfo/America/New_York  /etc/localtime

I don't think you know what I'm talking about.
I'm using timezone-data-2007b
Something has changed.
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 976
Location: The Village, Portmeirion

PostPosted: Sat Feb 17, 2007 5:03 am    Post subject: Re: how to set TIMEZONE variable to /etc/conf.d/clock ? Reply with quote

comprookie2000 wrote:
What do I add;
TIMEZONE="America/New_York"

That looks correct.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Sat Feb 17, 2007 5:19 am    Post subject: Reply with quote

Should be correct.

Here is an example for Vienna, which I have done now. The message at booting is gone.

Code:
notebook roman # cp /usr/share/zoneinfo/Europe/Vienna /etc/localtime
notebook roman # cat /etc/conf.d/clock
# /etc/conf.d/clock

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time).  If your clock is set to the local time, then
# set CLOCK to "local".  Note that if you dual boot with Windows, then
# you should set it to "local".

CLOCK="local"

# Select the proper timezone.  For valid values, peek inside of the
# /usr/share/zoneinfo/ directory.  For example, some common values are
# "America/New_York" or "EST5EDT" or "Europe/Berlin".

TIMEZONE="Europe/Vienna"

# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time
# during shutdown, then say "yes" here.

CLOCK_SYSTOHC="no"


### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes".
SRM="no"

# If your alpha uses the ARC console, set this to "yes".
ARC="no"
notebook roman #
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sat Feb 17, 2007 9:59 am    Post subject: Reply with quote

Thank you
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Sat Feb 17, 2007 10:00 pm    Post subject: Reply with quote

Is the /etc/localtime symlink outdated?
Back to top
View user's profile Send private message
comprookie2000
Retired Dev
Retired Dev


Joined: 25 Jul 2004
Posts: 925
Location: Sun City Center, Florida

PostPosted: Sat Feb 17, 2007 10:18 pm    Post subject: Reply with quote

On the dev mailing list they said to;

# cp /usr/share/zoneinfo/America/New_York /etc/localtime

instead of ln -s like we use to, I also was getting that warning/error about setting the TIMEZONE.

I have not rebooted but I am sure it is fine now.

D.Robbins was on the list and he was asking if there was any doc's about this;

someone said no just the error.

I don't know why it was changed but it would be nice to know.

I set up make.conf with;
Code:


PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="save"


just so I could catch something like this and all it said was;

Code:

WARN: postinst
You do not have TIMEZONE set in /etc/conf.d/clock.
Skipping auto-update of /etc/localtime.



but it doesn't say how to fix it.
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 976
Location: The Village, Portmeirion

PostPosted: Sun Feb 18, 2007 4:25 am    Post subject: Reply with quote

comprookie2000 wrote:
On the dev mailing list they said to;

Code:
# cp /usr/share/zoneinfo/America/New_York  /etc/localtime
I liked to use the symlink method. When there was an upgrade and the symlink broke i would get an error message, a reminder to relink. If I just copy the data from zoneinfo I would likely forget all about it. It would be left reading old data for who knows how long.
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Sun Feb 18, 2007 9:51 am    Post subject: Reply with quote

mikegpitt wrote:
Is the /etc/localtime symlink outdated?

It would appear so, but I'd like an answer too....
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

PostPosted: Sun Feb 18, 2007 10:43 am    Post subject: Reply with quote

mikegpitt wrote:
Is the /etc/localtime symlink outdated?

http://archives.gentoo.org/gentoo-dev/msg_142652.xml

See the rest of that thread for why the timezone entry in /etc/conf.d/clock was introduced.
_________________
www.gentoo.org.au || #gentoo-au
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2889
Location: Omnipresent

PostPosted: Tue Mar 20, 2007 4:29 am    Post subject: Reply with quote

I'm still confused.

What does the timezone specification in /etc/conf.d/clock set?

What does the copy of timezone data /etc/localtime set?

Everything on my system seems to be okay with the first, but dcron needs the second.

***

EDIT:

Nevermind, see here and here.

The timezone-data ebuild uses /etc/conf.d/clock to set /etc/localtime; nothing else uses it at present.

This still doesn't explain why everything except dcron seemed happy without /etc/localtime. It seems that glibc respects the env var TZ which I had set in my bash profile, but root doesn't have this env var of course, so all its processes fall back to /etc/localtime.

This can be demonstrated with the following bit of C code:

Code:
#include<time.h>
#include<stdio.h>

int main(void) {

        time_t t = time(0);

        printf("Sys time: %ld\n\n", t);
        printf("GMT time: %s\n", asctime(gmtime(&t)));
        printf("Local time: %s\n", ctime(&t));

        return 0;

}

_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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