2606B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2606B-901-01 Rev. B / May 2018
7-171
Details
This function sets the date and time of the instrument based on the
time
parameter (specified in
UTC time). UTC time is specified as the number of seconds since Jan 1, 1970, UTC. You can use
UTC time from a local time specification, or you can use UTC time from another source (for example,
your computer).
Example
systemTime = os.time({year = 2010,
month = 3,
day = 31,
hour = 14,
min = 25})
settime(systemTime)
Sets the date and time to Mar 31, 2010 at
2:25 pm.
Also see
(on page 7-98)
(on page 7-151)
(on page 7-171)
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 the daylight savings offset from UTC
dstStart
String representing when daylight savings time starts
dstEnd
String representing when daylight savings time ends
Details
You only need to set the time zone if you use the
os.time()
and
os.date()
functions.
If only one parameter is given, the same time offset is used throughout the year. If four parameters
are given, time is adjusted twice during the year for daylight savings time.
offset
and
dstOffset
are strings of the form
"[+|-]hh[:mm[:ss]]"
that indicate how much
time must be added to the local time to get UTC time:
•
hh
is a number between 0 and 23 that represents hours
•
mm
is a number between 0 and 59 that represents minutes
•
ss
is a number between 0 and 59 that represents seconds
The minute, second, +, and
−
fields are optional.