1 (edited by BarryMead 2011-02-25 19:18:10)

Topic: Timezone Stuck in California

Under any normal linux operating system setting the timezone to "America/Phoenix" and the timzone_city to Phoenix\tU.S.A.
will allow ntpdate to properly configure the correct local time.

This process works fine on the Chumby One also, but on the CHB Hacker Board it always shows the time as Pacific Standard Time irrespective of the settings in /psp/timezone.  This has to be a bug somewhere in how the time is
calculated from the timezone information only on the CHB hacker board not the Chumby One.

I verified that there are no other locations for the timezone file, and tested it with America/Phoenix, America/Chicago, and
even rebooted after changing the timezone file(s) before running ntpdate to be sure everything has a chance to read the
files, and still it stays stuck on California PST time  (This is winter) in summer it will probably be PDT or MST I am not sure.

But this is wrong, and I don't know where to begin my search to correct it.  Can someone give me a hint where this kind of
bug may be hiding?

Thanks,  Barry Mead


SOLVED!

The chumby does not utilize the /psp/timezone file to determine the timezone for the ntpdate command.  Instead they use
a symbolic link named localtime created in the /etc directory which points to one of the pre-made timezone files in the
/usr/share/zoneinfo directory.  These commands fixed my chumby to Phoenix Arizona time.

mount -oremount,rw /
ln -s /usr/share/zoneinfo/America/Phoenix /etc/localtime
mount -oremount,ro /

Now the "ntpdate -u pool.ntp.org" command grabs the time correctly, and the "date" command
shows the proper date and time zone information.

The ntpdate command is assumed to be executed after an internet connection is established of course.

Thanks,  Barry

Re: Timezone Stuck in California

BarryMead wrote:

The chumby does not utilize the /psp/timezone file to determine the timezone for the ntpdate command.  Instead they use
a symbolic link named localtime created in the /etc directory which points to one of the pre-made timezone files in the
/usr/share/zoneinfo directory.  These commands fixed my chumby to Phoenix Arizona time.

mount -oremount,rw /
ln -s /usr/share/zoneinfo/America/Phoenix /etc/localtime
mount -oremount,ro /

I have a Chumby 8 and tried the above but it did not work. Here is the output I received:

chumby-30-8c-70:~ # mount -oremount,rw /
chumby-30-8c-70:~ # ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
ln: /etc/localtime: File exists
chumby-30-8c-70:~ # mount -oremount,ro /

As you can see it says the file exists. I tried this with /psp/localtime as well and got the same results

Any ideas on how to set the correct timezone through SSH?

Re: Timezone Stuck in California

rscrash wrote:
BarryMead wrote:

The chumby does not utilize the /psp/timezone file to determine the timezone for the ntpdate command.  Instead they use
a symbolic link named localtime created in the /etc directory which points to one of the pre-made timezone files in the
/usr/share/zoneinfo directory.  These commands fixed my chumby to Phoenix Arizona time.

mount -oremount,rw /
ln -s /usr/share/zoneinfo/America/Phoenix /etc/localtime
mount -oremount,ro /

I have a Chumby 8 and tried the above but it did not work. Here is the output I received:

chumby-30-8c-70:~ # mount -oremount,rw /
chumby-30-8c-70:~ # ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
ln: /etc/localtime: File exists
chumby-30-8c-70:~ # mount -oremount,ro /

As you can see it says the file exists. I tried this with /psp/localtime as well and got the same results

Any ideas on how to set the correct timezone through SSH?

use ln -fs, or just remove the file before creating the symlink

Re: Timezone Stuck in California

I found out that you have to delete the existing /etc/localtime file before creating the link.

Here is what I used and it worked.

chumby-30-8c-70:~ # mount -oremount,rw /
chumby-30-8c-70:~ # cd /etc
chumby-30-8c-70:~ # cp localtime localtime.old
chumby-30-8c-70:~ # rm localtime
chumby-30-8c-70:~ # ln -s /usr/share/zoneinfo/America/New_York localtime
chumby-30-8c-70:~ # mount -oremount,ro /

As soon as I created the updated link it updated the clock to the correct Time Zone.