On standard Linux desktop systems there is a sophisticated timezone
configuration systems, see e.g.
http://www.linuxjournal.com/article/12
http://www.vmts.net/article/linuxclock.htm
However I don't think the minimal on-board linux image has the zoneinfo
database[see below]. However if you are using the Debian dev. image it
should be all
there.
If you have access to a full linux system check out the man pages on
tzselect.
Linux/Unix keeps the system clock recording the number of seconds since
00:00 of the 1st Jan 1970 GMT, and uses a set of records that define
local timezones, including daylight saving etc and when they change, to
convert the GMT time to localtime. So on my desktop system the default
timezone set for my machine is the UK timezone, but I can set any time
zone I want by setting the new timezone in the environment
variable TZ, hence overriding the default. Here I show the time and date
in the UK, in Sweden, and in the EST timezone of the USA....
:~$ date
Tue Jan 2 19:55:26 GMT 2007
:~$ export TZ='Europe/Stockholm'
:~$ date
Tue Jan 2 20:55:51 CET 2007
:~$ export TZ=EST
:~$ date
Tue Jan 2 14:56:19 EST 2007
cheers
Jim
setting a timezone on the minimal linux image:
from another full Linux image (virutally any will do) identify the
timezone confgiuration file you are interested in, they are usually in
/usr/show/zoneinfo
and copy it to /etc/localtime on the TS board. All times given by
localtime function (or the command line date) will now be for that
timezone. I copied the CET timezone info over
scandium# date
Wed Jan 3 02:28:52 CET 2007
scandium# rm /etc/localtime
scandium# date
Wed Jan 3 01:29:21 UTC 2007
removing the definition file reverts to GMT/UTC
HTH
On Mon, 1 Jan 2007, Laks wrote:
> Thanks for your help
> now the program works
> how can i change time format from UTC to other formats in TS7250
>
|