fred basset
2012-07-01 21:48:52 UTC
Hi Guys,
I'm having trouble with getting the local timezone correct. I have
stored the timezone in verified correct format (e.g. PST8). I have an
rc.default script which is run as run as part of the startup process,
and it exports TZ as PST8.
I've verified the variable is being set correctly by running "set" after boot:
# set
TZ=PST8
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
TERM=vt102
HOME=/
#
However, when I run the "date" command I get back:
Sun Jul 1 21:46:25 UTC 2012
which is the time right now in UTC, so it looks like it's ignoring TZ.
Am I doing something wrong by exporting TZ in my startup script?
What is the preferred way of setting the timezone? We're using ucLibc
too.
Thanks,
Fred
I'm having trouble with getting the local timezone correct. I have
stored the timezone in verified correct format (e.g. PST8). I have an
rc.default script which is run as run as part of the startup process,
and it exports TZ as PST8.
I've verified the variable is being set correctly by running "set" after boot:
# set
TZ=PST8
PS2=>
PS1=#
IFS=
USER=root
SHELL=/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
TERM=vt102
HOME=/
#
However, when I run the "date" command I get back:
Sun Jul 1 21:46:25 UTC 2012
which is the time right now in UTC, so it looks like it's ignoring TZ.
Am I doing something wrong by exporting TZ in my startup script?
What is the preferred way of setting the timezone? We're using ucLibc
too.
Thanks,
Fred