How to make a process detect time zone change?

Peter Steele psteele at maxiscale.com
Tue Mar 16 15:23:23 UTC 2010


We have a system controlled through a Java GUI and one of the commands provided in the GUI is to change the date/time, including the time zone. When the time zone is changed the FreeBSD system immediately recognizes the change (that is, the date command from the command line shows the correct time and time zone). However, our running C apps do not recognize that a time zone change has occurred unless they are restarted. What's the proper way to inform an active process that a time zone change has occurred? I've tried tzset() and tzsetwall() but neither seem to do the trick. The only thing I've found that works is to restart the process, and that's not really a solution.



More information about the freebsd-questions mailing list