ControlledUnpack:
PROC [time:
GMT, zone: Zone, dst:
DST ← unspecified, beginDST: [0..366] ← 0, endDST: [0..366] ← 0]
RETURNS [Unpacked];
ControlledUnpack produces an unpacked time in the specified zone, and decides upon daylight savings time as follows: if dst = yes, then yes, if dst = no, then no, otherwise it checks the unpacked date against [beginDST..endDST], exactly as in Unpack.
ControlledUnpack is to be used in place of Unpack, whenever the client wants to directly control the zone and DST calculation. To get the effect of Unpack, execute the following code:
tp: BasicTime.ZoneAndDST = BasicTime.GetZoneAndDST[];
xxx ← ControlledUnpack[time, tp.zone, unspecified, tp.beginDST, tp.endDST];
The result can be converted to a rope by using Convert.RopeFromUnpackedTime