Series 2600B System SourceMeter® instrument Reference Manual Section 9: TSP command reference
2600BS-901-01 Rev. F/August 2021 9-169
Details
If this function fails, it returns nil (for success) and an error message string (for msg).
Example
os.rename("testFile", "exampleFile")
Changes the name of the existing file
testFile to the name exampleFile.
Also see
os.remove() (on page 9-168)
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 9-194)
settimezone() (on page 9-195)