Originally Posted by jlightner
Setting your time zone only change how you see the time not the actual time.
For example if I have processes showing STIME of 16:50 in my EST5EDT zone then do "export TZ=PST8PDT" and then do ps -ef for them they now show 13:50 for STIME.
To make it more clearly. I am developping the front end user interface for an embedded system based on ELDK (Embedded Linux development kit).
From within this application I want to change the time zone and the next programmatic calls to time and localtime should consider the new time zone (The time is shown on a display and can already be changed and is synchronized with NTP).
That is "how I see the time, not the actual time".
If I restart the application, time and localtime correctly consider the new time zone.
Guess there are some tables initialized when starting a process. Is there any way to reinitialize the tables?
There is also no environment variable TZ set. How should this effect the calls to time and localtime within an application?
Thanks again for any hints!