Setting Time zone with TZ environment variable
On an embedded Debian ARM system for which I am programming the C localtime function returns the UTC time rather than the local time. I searched the Net and found out this was because the TZ environment variable is not set.
Booting into other Linux distros ( Ubuntu, Fedora ) I notice that the TZ environment variable is not set for myself as a login user, and yet the 'date' command gives the local time correctly.
Can someone tell me why a Linux distro which does not have the TZ environment variable set gives the correct local time when I issue the 'date' command but the embedded Debian ARM system for which I am programming, which also has no TZ environment variable set, gives me the UTC time when I issue the 'date' command ?
The question is how I get the embedded Debian ARM system to have the correct local time. Maybe I need to ask that on some Debian forum, but I thought I would try here to try to get some insight into this problem.
|