Section 7: Command reference
Models 707B and 708B Switching Matrix Reference Manual
7-168
707B-901-01 Rev. A / August 2010
Details
This function sets the date and time of the system based on the
os.time()
response passed in as its
parameter. Use year, month, day, hour, min, and sec to set the time as desired. The first three parameters to
os.time()
are mandatory while the rest are optional. If the later 3 are not used, they default to noon for that
day. The setting of the time and date does not take into account the time zone. Please update the time for your
time zone.
Time must be specified as UTC time. If only the time needs to be changed, the new hour, minutes, and seconds
can be passed as arguments without using
os.time()
.
Set the time zone before reading the time using
os.time()
or before generating a UTC time from a local time
specification.
Example
systemTime = os.time({year = 2010,
month = 3,
day = 31,
hour = 14,
min = 25})
settime(systemTime)
print(settime())
print(settime(10, 10, 10))
Sets the date and time to Mar 31, 2010 at
2:25 pm.
Output:
Wed Mar 31 14:25:05 2010
Wed Mar 31 10:10:10 2010
Also see
(on page 7-96)
settimezone()
This function sets the local time zone.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
settimezone(offset)
settimezone(offset, dstOffset, dstStart, dstEnd)
offset
String representing offset from UTC
dstOffset
String representing daylight savings offset from UTC
dstStart
String representing when daylight savings time starts
dstEnd
String representing when daylight savings time ends