.TSWITCH - change to a new time zone locale.

Alternate Entry Name: _TSWITCH

Usage:

B:
   %b/manif/t_ctrl
   tz = .tswitch(localename);
C:
   #include <t_ctrl.h>
   _T_locale _tswitch(const char *localename);

Examples:

old = .tswitch("US/EST");

Where:

localename
is the name of a locale that is recognized in the current time zone definitions.
tz
is the previous time zone locale. If the specified "localename" is not the name of a recognized time zone locale, according to the current time zone definition file, .TSWITCH returns zero and does not change the time zone locale.

Description:

.TSWITCH changes to a new time zone locale. All subsequent time zone calculations will be made in the context of that locale.

The .TINIT function automatically issues the call

 .tswitch("default");

so that the program starts working in the default locale.

See Also:

expl b tz
for background on time zones.
expl b lib .tinit
for setting time zone definitions.

Copyright © 1996, Thinkage Ltd.