implementation of SetTimeZoneInformation

I want to write a function to set the time zone information, as the function SetTimeZoneInformation in windows does. I think I need to set the TZ environment variable. But I need to set values as the function SetTimeZoneInformation does in windows. How shall I proceed? Or do I need some other approach? I am not using photon here, so phlocale function cant be used here.


There’s a good description of setting timezones in QNX here: … l#TimeZone . You’ll need to set the TZ environment variable and/or create a timezone file (/etc/TIMEZONE) with the appropriate format, for example: EST5EDT or EST5EDT4,M3.2.0/02:00:00,M11.1.0/02:00:00. The windows SetTimeZoneInformation function has similar parameters so depending on what you actually need to do it shouldn’t be too difficult to write a your own QNX SetTimeZoneInfo function that would take windows-like parameters and convert them to the QNX configuration string.