Guardian Programmer's Guide

Table Of Contents
Managing Time
Guardian Programmer’s Guide 421922-014
18 - 31
Interacting With the DST Transition Table
ERROR^MASK);
IF ERROR^MASK <> 0 THEN CALL INVALID^DATE;
OFFSET := 0;
CALL ADDDSTTRANSITION(LOW^GMT,HIGH^GMT,OFFSET);
!Third DST period; April 12, 1992 through October 18, 1992:
LOW^GMT := HIGH^GMT;
DATE^AND^TIME[0] := 1992; !year
DATE^AND^TIME[1] := 10; !month
DATE^AND^TIME[2] := 18; !day
DATE^AND^TIME[3] := 2; !hour
DATE^AND^TIME[4] := 0; !minute
DATE^AND^TIME[5] := 0; !second
DATE^AND^TIME[6] := 0; !millisecond
DATE^AND^TIME[7] := 0; !microsecond
HIGH^GMT := COMPUTETIMESTAMP(DATE^AND^TIME,
ERROR^MASK);
IF ERROR^MASK <> 0 THEN CALL INVALID^DATE;
OFFSET := SECONDS^IN^HOUR;
CALL ADDDSTTRANSITION(LOW^GMT,HIGH^GMT,OFFSET);
.
.
Note that the second call to ADDDSTTRANSITION, where zero offset is specified, is
not required on G05.00 and later G-series systems.
Using the ADDDSTTRANSITION Command
The ADDDSTTRANSITION TACL command has the same effect as calling the
ADDDSTTRANSITION or the DST_TRANSITION_ADD_ procedures. Again you
supply two Julian timestamps that mark the beginning and end of the period and an
offset in hours and minutes. The following example uses ADDDSTTRANSITION
commands to achieve the same effect as the ADDDSTTRANSITION procedure calls in
the previous example:
1> ADDDSTTRANSITION 14 APR 1991, 2:00 GMT, 20 OCT 1991, 2:00 GMT, 1:00
2> ADDDSTTRANSITION 20 OCT 1991, 2:00 GMT, 12 APR 1992, 2:00 GMT, 0:00
3> ADDDSTTRANSITION 12 APR 1992, 2:00 GMT, 18 OCT 1992, 2:00 GMT, 1:00
Note that the second ADDDSTTRANSITION command is not necessary on G05.00
and later G-series systems, because zero offset is specified. Also, note that the
ADDDSTTRANSITION command allows you to specify LST instead of GMT.
Using the DST_TRANSITION_ADD_ Procedure
You supply the DST_TRANSITION_ADD_ procedure with a pointer to the
zsys_ddl_dst_entry_def structure with its fields filled in. The z_lowgmt and z_highgmt
fields are Julian timestamps that specify the beginning and the end of a time period,
respectively. The z_offset field specifies the number of seconds that the LCT offsets
the LST for the specified time period. The z_version field must be set to
DST_VERSION_SEP1997.