View previous topic :: View next topic |
Author |
Message |
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Sat Feb 17, 2007 1:33 am Post subject: how to set TIMEZONE variable to /etc/conf.d/clock ?(SOLVED) |
|
|
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 |
|
|
ghutzl Tux's lil' helper
Joined: 29 May 2005 Posts: 123 Location: Germany
|
Posted: Sat Feb 17, 2007 2:20 am Post subject: |
|
|
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 |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Sat Feb 17, 2007 3:29 am Post subject: |
|
|
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 |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 976 Location: The Village, Portmeirion
|
Posted: Sat Feb 17, 2007 5:03 am Post subject: Re: how to set TIMEZONE variable to /etc/conf.d/clock ? |
|
|
comprookie2000 wrote: | What do I add;
TIMEZONE="America/New_York" |
That looks correct. |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Sat Feb 17, 2007 5:19 am Post subject: |
|
|
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 |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Sat Feb 17, 2007 9:59 am Post subject: |
|
|
Thank you |
|
Back to top |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sat Feb 17, 2007 10:00 pm Post subject: |
|
|
Is the /etc/localtime symlink outdated? |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Sat Feb 17, 2007 10:18 pm Post subject: |
|
|
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 |
|
|
skellr l33t
Joined: 18 Jun 2005 Posts: 976 Location: The Village, Portmeirion
|
Posted: Sun Feb 18, 2007 4:25 am Post subject: |
|
|
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 |
|
|
pteppic l33t
Joined: 28 Nov 2005 Posts: 781
|
Posted: Sun Feb 18, 2007 9:51 am Post subject: |
|
|
mikegpitt wrote: | Is the /etc/localtime symlink outdated? |
It would appear so, but I'd like an answer too.... |
|
Back to top |
|
|
mark_alec Bodhisattva
Joined: 11 Sep 2004 Posts: 6066 Location: Melbourne, Australia
|
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Tue Mar 20, 2007 4:29 am Post subject: |
|
|
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 |
|
|
|