why is this command being ignored?

Talk about anything related to Gentoox or Gentoo.
Post Reply
lateralus
Novice
Posts: 25
Joined: Sat Jun 10, 2006 3:35 pm

why is this command being ignored?

Post by lateralus » Sat Jun 02, 2007 5:37 am

Xbox ~ # date
Sat Jun 2 05:34:37 UTC 2007

then i run:

Xbox ~ # ln -sf /usr/share/zoneinfo/America/GMT /etc/localtime
Xbox ~ # date
Sat Jun 2 05:35:24 UTC 2007

notice the same UTC timezone not GMT? I am logged in as root and this command is supposed to change your time zone. So why is it being ignored? I used it successfully once, but unfortunately i changed it to the wrong time zone and now it's stuck there. Can anyone help me?

thanks, lateralus

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Sun Jun 03, 2007 9:31 pm

Does setting it to /usr/share/zoneinfo/America/Vancouver change your timezone to PDT? (or some other one change it to something else?) or is it just GMT that's malfunctioning.

Can't remember if you have to restart any of the services after redoing the symlink.

lateralus
Novice
Posts: 25
Joined: Sat Jun 10, 2006 3:35 pm

Post by lateralus » Mon Jun 04, 2007 1:33 am

it wont change no matter what time zone you try

Xbox ~ # date
Mon Jun 4 01:33:14 UTC 2007
Xbox ~ # ln -sf /usr/share/zoneinfo/America/Vancouver
Xbox ~ # date
Mon Jun 4 01:33:19 UTC 2007


grr....

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Mon Jun 04, 2007 3:02 am

Dunno what the problem is =/

Code: Select all

xbox etc # date
Sun Jun  3 19:59:58 PDT 2007
xbox etc # rm localtime 
xbox etc # ln -s /usr/share/zoneinfo/GMT localtime
xbox etc # date
Mon Jun  4 03:00:16 GMT 2007
xbox etc # rm localtime
xbox etc # ln -s /usr/share/zoneinfo/America/Vancouver localtime
xbox etc # date
Sun Jun  3 20:00:34 PDT 2007

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Mon Jun 04, 2007 3:05 am

oh, wait, forgot about /etc/conf.d/clock. I assume yours still lists UTC as the "CLOCK" setting...


# /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="America/Vancouver"

# 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"

orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi » Mon Jun 04, 2007 7:12 am

Also check this link

http://www.gentoo.org/doc/en/gentoo-x86 ... nstall.xml

You might be looking to copy instead of soft link your timezone.

User avatar
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer » Mon Jun 04, 2007 3:19 pm

softlink should work fine, but I think you have to change /etc/conf.d/clock's "CLOCK" directive to have it use localtime instead of defaulting to UTC all the time (which should be why his always shows UTC).

*EDIT* And restart /etc/init.d/clock or reboot

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests