Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-152 2601B-PULSE-901-01A April 2020
Example
os.rename("testFile", "exampleFile")
Changes the name of the existing file
testFile to the name exampleFile.
Also see
os.remove() (on page 11-151)
os.time()
This function generates a time value in UTC time.
Usage
utcTime = os.time()
utcTime = os.time(timespec)
The date and time (year, month, day, hour, and minute)
Details
The timespec is a table using the fields listed in the table below.
If the time (hour, minute, and second) options are not used, they default to noon for that day. When
called without a parameter (the first form), the function returns the current time.
Set the time zone before calling the os.time() function.
Example
systemTime = os.time({year = 2019,
month = 3,
day = 31,
hour = 14,
min = 25})
settime(systemTime)
Sets the date and time to Mar 31, 2019
at 2:25 pm.
Also see
settime() (on page 11-172)
settimezone() (on page 11-173)