Skip to content
On this page

๐Ÿ“œ Get System Information API

The following APIs provide interfaces to obtain necessary system information:

Get Current Time String

system.getTimeStr()

  • Return value: The current time string, using the local time zone and 24-hour clock. For example: 2021-04-03 19:15:01
  • Return value type: String

Get the Current Time Object

system.getTimeObj()

  • Return value: The current time object Object)

  • Return value type: Object<Integer,Integer,Integer,Integer,Integer,Integer,Integer>

  • For the returned time object tm, there are the following members:

FieldMeaningData Type
tm.YYear value (4 digits)Integer
tm.MMonth valueInteger
tm.DDay valueInteger
tm.hHour value (24-hour clock)Integer
tm.mMinute valueInteger
tm.sSeconds valueInteger
tm.msMillisecond valueInteger

Randomly Generate a Guid String

system.randomGuid()

  • Return value: A randomly generated unique identifier GUID.
  • Return value type: String

Randomly Generate a UUID String

Warning

This function is only available in 0.19.1 and later.

system.randomUuid()

  • Return value: A randomly generated unique identifier UUID.
  • Return value type: String