Setlocaltime – AMT Datasouth PAL User Manual
Page 180

_setlocaltime
174
DOWInt
Integer. 1..7 or 0. Not used to set clock electronics. Required for
compatibility with _localtime.
ZoneNum
Integer or fixed-point. 0..23 or -1. If a fixed-point value is used, the
fractional portion of the value must be zero at this time.
SaveInt
Integer. 0, 1. The use of this value is subtly, but very significantly
different from its _localtime counterpart. See comments below.
Comments
Setting AvailBool to
false
effectively causes the _setlocaltime operator to not perform any
operation. However, the operator will still require that TimeArray contain the appropriate number
of elements. This interpretation of the AvailBool entry in TimeArray provides the proper
complement to the AvailBool entry returned by the _localtime operator.
_setlocaltime does not use DOYInt to set the current day of the year. For the _localtime
operator, the printer always calculates the day of the year from the other time values. The
_setlocaltime operator does impose the 1..366 range, or a filler value of zero, restriction upon
DOYInt value. The operator requires this TimeArray entry strictly for compatibility with the
TimeArray operand returned by the _localtime operator.
_setlocaltime does not use DOWInt to set the current day of the week. For the _localtime
operator, the printer always calculates the day of the week from the other time values. The
_setlocaltime operator does impose the 1..7 range, or a filler value of zero, restriction upon this
value. The operator requires this TimeArray entry strictly for compatibility with the TimeArray
operand returned by the _localtime operator.
ZoneNum establishes the relationship between the local time and Greenwich mean time (GMT).
The user can use a value of -1 to indicate that the relationship is either not important to the user’s
use of the printer, or is not known and, by implication, not important to the user’s use of the
printer. Establishing this value allows printers and/or systems in different time zones to resolve
their time relationships.
The _setlocaltime and _localtime operators interpreter the meaning of the SaveInt parameter in
different ways. However, the difference is very subtle and the user should play close attention to
this dicussion.
The SaveInt value return by _localtime indicates whether or not the current time is for daylight
savings time or standard time. The _setlocaltime SaveInt value is used to indicate whether the
locality uses daylight savings time during the year. Therefore, if the locality uses daylight savings
time but it is currently standard time at that locality, _localtime will return
false
for SaveInt
since the current time is not daylight savings time. However, the user would still specify
true
for
the _setlocaltime SaveInt value since the locality uses daylight savings time.
The real-time clock electronics in many PAL printers support the automatic updating of their
internal time during the cross overs between daylight savings time and standard time. The
_setlocaltime SaveInt value indicates whether or not the printer should enable this feature within
the printer’s electronics. Also, the _localtime operator will only return a
true
value during
daylight savings time if the user has instructed the printer that the locality uses daylight savings
time.