In a distributed environment, you may have users in several time zones. Use the TZ or _TZ environment variable to set each time zone. The user of your application can use the ENVAR runtime option with the TZ or _TZ environment variable to select the appropriate time zone.
For POSIX(ON) programs the TZ environment variable is used. For POSIX(OFF) programs the _TZ environment variable is used.
When neither TZ nor _TZ is defined, the current locale is interrogated for time zone information. If neither TZ nor _TZ is defined and LC_TOD time zone information is not present in the current locale, a default value is applied to local time. POSIX programs simply default to Coordinated Universal Time (UTC), while non-POSIX programs establish an offset from UTC based on the setting of the system clock.
The following functions are time zone sensitive: ctime(), ctime64(), getdate(), localtime(), localtime64(), mktime(), mktime64(), strftime(), and tzset(). The external variables daylight, timezone, and tzname and the thread specific functions __dlght() and __tzone() are also time zone sensitive.
LC_TOD category of a localeYou can customize the LC_TOD category in a locale to a particular time zone. The LC_TOD category binds each C/C++ locale to one time zone. For more information about customizing the LC_TOD category, see LC_TOD category and Customizing a locale.