Model 2601B-PULSE System SourceMeter Instrument Reference Manual Section 11: TSP command reference
2601B-PULSE-901-01A April 2020 11-173
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 = 2020,
month = 3,
day = 31,
hour = 14,
min = 25})
settime(systemTime)
Sets the date and time to Mar 31, 2020
at 2:25 pm.
Also see
gettimezone() (on page 11-97)
os.time() (on page 11-152)
settimezone() (on page 11-173)
settimezone()
This function sets the local time zone.
Usage
settimezone(offset)
settimezone("offset", "dstOffset", "dstStart", "dstEnd")
String representing offset from UTC
String representing the daylight savings offset from UTC
String representing when daylight savings time starts
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.