SET stamp=$ZTIMESTAMP,clock=$HOROLOG,miliclock=$NOW()
WRITE !,"local date and time: ",$ZDATETIME(clock,1,1,2)
WRITE !,"local date and time: ",$ZDATETIME(miliclock,1,1,2)
WRITE !,"UTC date and time: ",$ZDATETIME(stamp,1,1,2)
IF $PIECE(stamp,",",2) = $PIECE(clock,",",2) {
WRITE !,"Local time is UTC time" }
ELSEIF $PIECE(stamp,",") '= $PIECE(clock,",") {
WRITE !,"Time difference affects date" }
ELSE {
SET localutc=$ZDATETIMEH(stamp,-3)
WRITE !,"UTC converted to local: ",$ZDATETIME(localutc,1,1,2)
}
QUIT
SET stamp=$ZTIMESTAMP,clock=$HOROLOG
WRITE !,"local date and time: ",$ZDATETIME(clock,1,1,2)
WRITE !,"UTC date and time: ",$ZDATETIME(stamp,1,1,2)
IF $PIECE(stamp,",") '= $PIECE(clock,",") {
WRITE !,"Time difference affects date" }
SET clocksecs=$EXTRACT(clock,7,11)
SET stampsecs=$EXTRACT(stamp,7,11)-($ZTIMEZONE*60)
IF clocksecs=stampsecs {
WRITE !,"No local time variant"
WRITE !,"Local time is timezone time" }
ELSE {
SET stampsecs=stampsecs+3600
IF clocksecs=stampsecs {
WRITE !,"Daylight Saving Time variant:"
WRITE !,"Local time offset 1 hour from timezone time" }
ELSE { WRITE !,"Cannot reconcile due to local time variant" }
}
QUIT