com.webos.service.systemservice

API Summary

Provides access to the webOS system settings such as:

  • Backup options
  • Getting device information
  • Getting and modifying the date and time settings
  • Setting ringtones
  • Wallpaper
  • Local formats

Note: This service can be used by both: internal system services and third-party components. However, third-party components cannot access and modify all system-critical settings. These methods are marked as "private".

Overview of the API

(click to expand)

This service must be used when an application needs to read or modify system settings. It should not be used to implement any business functionality, such as saving business data through backup procedures. It is often used by UI applications.

This API provides a group of system utilities:

  • backup - backs up the systemprefs database
  • clock - manage clock settings
  • deviceInfo - query device information
  • erase - options to erase specified partition
  • osInfo - query OS information
  • time - manage time settings
  • ringtone - options to add or delete ringtones
  • wallpaper - manage wallpaper settings
  • preferences - options to store and load preferences

Preferences

These values represent system settings which can be queried or modified. Some of them are read-only or write-only, some values are hardware specific(like ringtone). A list of system preference values:

  • locale
  • region
  • ringtone
  • useNetworkTime
  • useNetworkTimeZone
  • timeZone
  • timeFormat
  • timeChangeLaunch - list of ls2 uris to launch when time is changed
  • timeDriftPeriodHr - time refresh period
  • wallpaper
  • screenSize.width
  • screenSize.height 

User can set their own values, these values will be stored permanently. Custom values can be used to save program settings.

There are three functions to manage preference values:

  • getPreferences - get system/custom preference values
  • setPreferences - set system/custom preferences values
  • getPreferenceValues - get vaild values for system preferences

Open All


backup/postRestore

Description

The postRestore method restores the platform-specific environment settings from the dump file, previously created by the preBackup method call.

Call this method after executing the restore procedure in order to restore platform-specific settings.

The dump files are saved into the directory specified by the temp_dir parameter.

This method is internal, only system applications can use it. It is not available to third-party applications.

Parameters

Name

Required

Type

Description

tempDirRequiredstring

Directory to store temporarily generated files (files that are to be restored).

filesRequiredstring array

List of files to restore.

Call Returns

Name

Required

Type

Description

returnValueRequiredboolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check  "errorText" field for details
errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

NoneRequired Arguments Missing.

Some of the arguments required for this method have not been provided.

NoneInvalid arguments.

Some of the arguments provided to the method have invalid values.

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/backup/postRestore

'{

"tempDir": "/tmp/",

"files": ["/var/luna/preferences/systemprefs_backup.db"]

}'

{

"returnValue": true

}


backup/preBackup

Description

The preBackup method creates dump files containing platform-specific environment settings. Call this method before executing the backup procedure in order to save these settings.

The dump files are saved into the directory specified by the temp_dir parameter or '${localstatedir}/preferences'.

The list of the platform-specific settings that are saved in the dump file is specified in the sysservice-backupkeys.json file. Below is an example of this file:

[
    "useNetworkTime",
    "useNetworkTimeZone",
    "timeZone",
    "timeChangeLaunch",
    "showcontactmatch",
    "x_webos_virtualkeyboard_prefs"
]

If any of the method parameters is not specified or specified incorrectly, the method will use the default values.

This method is internal, only system applications can use it. It is not available to third-party applications.

Parameters

Name

Required

Type

Description

incrementalKey Optional object

This is used primarily for mojodb, backup service will handle other incremental backups.

maxTempBytes Optional number

The allowed size of upload. It is currently set at 10MB.

tempDir Optional string

Directory to store temporarily generated files.

Call Returns

Name

Required

Type

Description

description Required string

Describes the backup.

 

version Required string

Version of the backup.

 

files Required string array

List of files included in the backup.

 

Example

Example response for a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/backup/preBackup '{}'

{

"description": "Backup of LunaSysService, containing the systemprefs sqlite3 database",

"version": "1.0",

"files": [

"\/var\/luna\/preferences\/systemprefs_backup.db"

]

}


clock/getTime

Description

The getTime method gets the current time for a specific time source.

There are several time data sources on the system: Linux system time, user time, network-broadcast time and more. When calling this method, you can specify the desired time data source in the source parameter. The complete list of the data sources is listed in the source parameter description below. 

Any application can use this method.

Parameters

Name

Required

Type

Description

sourceOptionalString

Time-source to access (default "system")
Supported sources:

  • system - Linux system-wide time (always available)
  • manual - Last time set manually by user
  • sdp - time received with session initialization to server (ex. device membership registration)
  • ntp - time periodically or by request received from NTP (Network Time Protocol) service
  • nitz - time received over NITZ (Network Identity and Time Zone) from cellular network provider (ex. GSM operator)
  • broadcast - time received through broadcast signal
  • broadcast-adjusted - same as broadcast but adjusted in a way to represent time with offset from broadcast regional offset table after applying Linux system-wide time-zone

Note: Some platforms may have different subsets of mentioned time sources according to the value of preference timeSources

manualOverrideOptionalBoolean
  1. If manualOverride set to false means that source shouldn't be overriden by manual time when useNetworkTime is turned to false (use the time user specified manually).
  2. If useNetworkTime is set to false and manualOverride is set to true, get time specified in source parameter.
  3. If useNetworkTime is set to false and manualOverride is set to false, ignore the time in the source parameter and get the time from manual time.

The default value of manualOverride is true and gets the time from the source parameter system.

Note: useNetworkTime is a preference that is set by the setPreferences, getPreferences, and getPreferenceValues methods. The values for these preferences depend on the app or product that is being used.

fallbackOptionalString

Fall-back time source to use when requested one is missing. If not set and time-source specified in "source" is missing request will fail (unless overridden by manual time).

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
sourceRequiredString

Actual time source associated with result (either one specified in source or in fallback or manual if overridden).

utcRequiredNumber

Seconds since epoch for UTC.

offsetRequiredObject: TimeSourceOffset

Offset from some other time source (usually from system).

systemTimeSourceOptionalString

If system-wide system time is returned and this field is present, it will denote last time source used for system time synchronization.

priorityOptionalNumber

Priority of returned time source (with higher level overrides one with lower).

timestampOptionalObject: Timestamp

Monotonic timestamp.

errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

NoneRequested clock is not registered

Time source is not among list of available ones ("timeSources").

NoneNo time available for that clock

Requested time source not yet available (ex. no Internet for "ntp").

1Could not validate json message against schema

The request data is invalid.

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/clock/getTime '{}'

{

"source": "system",

"offset": {

"source": "system",

"value": 0

},

"systemTimeSource": "sdp",

"timestamp": {

"source": "monotonic",

"sec": 94528,

"nsec": 612100095

},

"returnValue": true,

"utc": 1448556831

}


clock/setTime

Description

The setTime method is used to set the time. By calling this method you can update any time data source, including Linux system time, network-broadcasted time, user time and others.

Any application can use this method.

After this method is called, the system services receives a notification about the time update.

Parameters

Name

Required

Type

Description

utcRequiredNumber

Seconds since epoch in UTC time-zone. 

Note: Either utc field or available field is mandatory.

sourceOptionalString

Time source associated with time info update (default "manual").
See clock/getTime method for more details.

availableRequiredBoolean

Availability flag. Set to false to specify that source is not available.

Note: Either available field or utc field is mandatory.

timestampOptionalObject: Timestamp

Monotonic timestamp. If set, will be used to calculate a delay between sending and receipt of this request over luna-bus and add that to utc field.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check  "errorText" field for details

. The clock/setTime method may fail because:

  • Requested clock is not registered.
errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

1Could not validate json message against schema

The request data is invalid.

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/clock/setTime '{"utc":1448556562}'


deviceInfo/query

Description

The query method to get the device system information such as product Id, system number, hardware information, Wi-FI address, battery status and others. Please refer to the return values table below for a complete list of the system parameters.

Note: This is an internal method. Third-party applications cannot use it.

Parameters

Name

Required

Type

Description

parameters Optional String array

List of requested parameters. If not specified, all available parameters wiil be returned.

Accepted parameters:

  • battery_challange
  • board_type
  • product_id
  • serial_number
  • installer
  • modem_present
  • storage_size
  • hardware_id
  • nduid
  • hardware_revision
  • ram_size
  • wifi_addr
  • wired_addr
  • last_reset_type
  • storage_free
  • battery_response,
  • device_name
  • bt_addr
  • keyboard_type

Call Returns

Name

Required

Type

Description

board_type Optional String

Board type

device_name Optional String

Device name

hardware_id Optional String

Hardware ID

hardware_revision Optional String

Hardware revision

installer Optional String

Tool used to install the image.

Currently, the Is not supported value is always returned.

keyboard_type Optional String

Refers to the keyboard built into the device. Example: virtual

modem_present Optional String

Modem availability

nduid Optional String

NDUID

product_id Optional String

Product ID

radio_type Optional String

Internal ID code for the radio type.

Currently, the Is not supported value is always returned.

ram_size Optional String

RAM size

serial_number Optional String

Serial number

storage_free Optional String

Free storage size

Currently, the Is not supported value is always returned.

storage_size Optional String

Storage size

wifi_addr Optional String

WiFi MAC address

wired_addr Optional String

Wired/Ethernet MAC address

last_reset_type Optional String

Reason code for last reboot (may come from /proc/cmdline).

Currently, the Is not supported value is always returned.

battery_challange Optional String

Battery challenge.

Currently, the Is not supported value is always returned.

Note: there is a typo in the parameter name. Use the spelling as given in this table.

battery_response Optional String

Battery response.

Currently, the Is not supported value is always returned.

returnValue Required Boolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorText Optional String

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

bt_addrd Optional String

Currently, the Is not supported value is always returned.

errorCode Optional Number

 The error code for the failed operation.

Note:If the method fails, the errorText is always returned but the errorCode is returned only for specific errors..

Error References

Error Code

Error Text

Error Description

None Invalid message payload

JSON format is not valid

None 'parameters' needs to be an array

parameters field should be a JSON string array e.g. ["param1", "param2"]

None Internal error. Can't initialize nyx

Failed to load nyx library.

None Internal error. Can't open nyx device

Nyx library error.

None Invalid parameter: + [parameter name]

The parameter mentioned in the error messageis invalid.

 


erase/EraseAll

Description

The eraseAll method erases all partitions on the internal system storage. The method will clear:

  1. Media partition: the data saved by the user.
  2. Var partition: the external applications and their data.
  3. Developer partition: unsigned applications.

This method is internal, only system applications can use it. It is not available for the third-party applications.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check and "errorText" field for details
errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

NoneFailed to execute NYX erase API

Failed to execute NYX erase API

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/erase/EraseAll '{}'


getPreferences

Description

The getPreferences method retrieves the values for keys specified in a passed array. If subscribe is set to true, then getPreferences sends an update if the key values change. This method queries system preference values and custom user values.

Parameters

Name

Required

Type

Description

subscribeOptionalboolean

If subscribe is set to true, then getPreferences sends an update if the key values have changed.

keysRequiredstring array

An array of key names. A key is a system preference or custom user key (see overview of this API for details).

Call Returns

Name

Required

Type

Description

subscribedOptionalboolean

True if the subscription was successful

returnValueRequiredboolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalstring

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

Noneno keys specified

The keys property has not been provided to the method.

Noneno key array specified

The keys property provided is not an array.

Noneinvalid key array

The keys array does not have any values.

Noneinvalid value encoded in preference("did you escape your strings?")

Subset of requested values have preferences that contain invalid json representation.

1Could not validate json message against schema

The request data is invalid.

Example

Example of a successful call:

luna-send -P -n 1 -f luna://com.webos.service.systemservice/getPreferences '{"keys": ["locale"]}'

{

"subscribed": false,

"locale": {

"languageCode": "en",

"phoneRegion": {

"countryName": "United States",

"countryCode": "us"

},

"countryCode": "us"

},

"returnValue": true

}


getPreferenceValues

Description

The getPreferenceValues method retrieves a list of valid values for the specified key. If the key is of a type that takes one of a discrete set of valid values, getPreferenceValues returns that set. Otherwise, getPreferencValues returns nothing for the key. For more details, see the examples provided for this API method.

Parameters

Name

Required

Type

Description

keyRequiredstring

Key name to fetch preference values for.

Accepted key names:

  • locale
  • region
  • ringtone
  • useNetworkTime
  • useNetworkTimeZone
  • timeZone
  • timeFormat
  • timeChangeLaunch
  • timeDriftPeriodHr
  • nitzValidity
  • wallpaper
  • screenSize.width
  • screenSize.height

Call Returns

Name

Required

Type

Description

returnValueRequiredboolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. 

The getPreferenceValues method may fail because of:

  •  key is not specifyed or is invalid
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

1Could not validate json message against schema

The request data is invalid.

1Can't find handler for key: " + [key name]

The handler for the key specified in the error message cannot be found.

2Handler doesn't have values for key: " + [key name]

The handler countains no values for the key specified in the error message. 

Example

Example 1:

luna-send -n 1 -f luna://com.webos.service.systemservice/getPreferenceValues '{"key": "useNetworkTime" }'

{

"useNetworkTime": [true, false],

"returnValue": true

}

 

Example 2:

luna-send -n 1 -f luna://com.webos.service.systemservice/getPreferenceValues '{ "key": "timeFormat" }'

{

"timeFormat": ["HH12", "HH24"],

"returnValue": true

}


osInfo/query

Description

The query method returns operating system information. This method may be used to display the operating system version, API version, build name and date and so on.

This method is available for both internal and third-party applications.

Parameters

Name

Required

Type

Description

parameters Optional String array

List of requested parameters. If not specified, all available parameters will be returned.

The available parameters are those listed under the Name column under the Return section below (with the exception of errorCode and errorText).

Call Returns

Name

Required

Type

Description

core_os_kernel_version Optional String

Core OS kernel version info

core_os_name Optional String

Core OS name

core_os_release Optional String

Core OS release info

core_os_release_codename Optional String

Core OS release codename

webos_build_datetime Optional String

The UTC timestamp reflecting when the current image was built. The string is in the format "YYYYMMDDhhmmss".

webos_build_id Optional String

webOS build ID

webos_imagename Optional String

webOS imagename

webos_name Optional String

webOS name

webos_prerelease Optional String

webOS prerelease info

webos_release Optional String

webOS release info

webos_release_codename Optional String

webOS release codename

webos_manufacturing_version Optional String

webOS manufacting version

encryption_key_type Optional String

Encryption key type

returnValue Required Boolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorText Optional String

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

None 'parameters' needs to be an array

The parameters parameter must be an array.

None Can not initialize nyx

Internal error. Can't initialize nyx.

None Internal error. Can't open nyx device

Nyx API error

None Can't get OS parameter:

Failed to retrieve information for <parameter> where<parameter> is the name of one of the requested parameters passed to this method.

None Invalid parameter: +

The <parameter name> specified in the error message is invalid.

None Invalid message payload

The request JSON payload contains invalid data.

Example

luna-send-pub -n 1 -f luna://com.webos.service.systemservice/osInfo/query ' {"parameters":["webos_name", "webos_release","webos_build_id"]} '

{

    "webos_release": "1.0.p",

    "webos_build_id": "4",

    "webos_name": "webOS OSE",

    "returnValue": true

}


setPreferences

Description

The setPreferences method sets preference keys to specified values. The values are specified by pair: key - value in JSON format. See the example below.

Note: This method is public. It can be used both by the system and third-party applications.

Parameters

Name

Required

Type

Description

param208OptionalObject

Each such param represents a key-value pair of preference name and its value.

Existing key values are:

  • locale
  • region
  • ringtone
  • useNetworkTime
  • useNetworkTimeZone
  • timeZone
  • timeFormat
  • timeChangeLaunch
  • timeDriftPeriodHr
  • nitzValidity
  • wallpaper
  • screenSize.width
  • screenSize.height

New key will be created if any other key is specified.

Call Returns

Name

Required

Type

Description

returnValueRequiredboolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check  "errorText" field for details
errorTextOptionalstring

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

NoneSome settings could not be saved

Some settings could not be saved

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/setPreferences '{ "timeZone": {"ZoneID":"Europe/Kiev"}, "timeFormat": "HH12" }'


time/convertDate

Description

The convertDate method converts the given date from one timezone to another.

Parameters

Name

Required

Type

Description

dateRequiredString

Date to convert as a string in format: "Y-m-d H:M:S".

source_tzRequiredString

Source timezone.

dest_tzRequiredString

Destination timezone.

Call Returns

Name

Required

Type

Description

dateRequiredString

The date in the destination timezone if the call was successful.

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorText" field for details
errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

NoneUnrecognized date format:

Date format is unrecognized.

Noneunrecognized characters in date:

Characters in date are unrecognized.

NoneTimezone not found:

Timezone with the specified name is not found. Depending on which time zone is not recognized, either source timezone or detination time zone name will be specified in the error message.

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/time/convertDate

'{

"date": "1982-12-06 17:25:33",

"source_tz": "America/Los_Angeles",

"dest_tz":"America/New_York"

}'

{

"returnValue": true,

"date": "Mon Dec 6 19:25:33 1982"

}

 

Example of a failed call:

luna-send -n 1 -f luna://com.webos.service.systemservice/time/convertDate

'{

"date": "1982-12-06 17:25:33",

"source_tz": "America/Los_Angeles",

"dest_tz":"America/New_York1"

}'

{

"returnValue": false,

"errorText": "timezone not found: 'America/New_York1'"

}


time/getBroadcastTime

Description

The getBroadcastTime method returns the broadcast time, which is broadcasted by the TV signal provider.

Parameters

None

Call Returns

Name

Required

Type

Description

utcRequiredNumber

Seconds since epoch for UTC time-zone

localOptionalNumber

Seconds since epoch with offset according to broadcast regional offsets table

localtimeOptionalObject: LocalTime

Calendar representation of local time

timestampOptionalObject: Timestamp

Monotonic timestamp.

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

-2No information available

No broadcast time information available since boot

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/time/getBroadcastTime '{}'

{

"utc": 1418745993,

"localtime": {

"month": 12,

"day": 16,

"hour": 11,

"minute": 0,

"year": 2014,

"second": 41

},

"local": 1418727641,

"timestamp": {

"source": "monotonic",

"sec": 94707,

"nsec": 141357576

},

"returnValue": true

}


time/getEffectiveBroadcastTime

Description

The getEffectiveBroadcastTime method returns the effective broadcast time (the time broadcasted by the TV signal provider). If no broadcast time info update has been received since boot, the Linux system-wide time is returned.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Subscribe for notifications. Possible values are:

  • true - Get notifications
  • false - Notifications are not required

Default value: false

Call Returns

Name

Required

Type

Description

subscribedOptionalBoolean

True if the subscription was successful.

adjustedUtcRequiredNumber

Seconds since epoch suitable for converting from UTC to local time which corresponds with appropriate broadcast regional offset table entry

localRequiredNumber

Seconds since epoch with offset according to broadcast regional offsets table

localtimeOptionalObject: LocalTime

Calendar representation of local time.

timestampOptionalObject: Timestamp

Monotonic timestamp

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

-1Failed to get localtime

Failed to get localtime

1Could not validate json message against schema

The request data is invalid.

Example

Example of a successful call:

luna-send -P -n 1 -f luna://com.webos.service.systemservice/time/getEffectiveBroadcastTime '{}'

{

"timestamp": {

"source": "monotonic",

"sec": 94707,

"nsec": 141357576

},

"localtime": {

"month": 11,

"day": 26,

"hour": 8,

"minute": 56,

"year": 2015,

"second": 49

},

"adjustedUtc": 1448557009,

"local": 1448528209,

"returnValue": true,

"systemTimeSource": "sdp"

}


time/getNTPTime

Description

The getNTPTime returns the fresh NTP time (the time data transferred by the Network Time Protocol).

Parameters

None

Call Returns

Name

Required

Type

Description

utcOptionalNumber

Seconds since epoch for UTC time-zone

subscribedRequiredBoolean

subscribed will always contain false.

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

NoneNTP requests are prohibited at the moment

NTP requests are prohibited at the moment

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/time/getNTPTime '{ }'


time/getSystemTime

Description

The time/getSystemTime method gets the system time and time zone information. Apps can susbcribe to this method and receive notifications when the time zone changes and/or the system time changes by a significant amount (currently 5 min.).

This method does not generate errors, however if the LSSubscriptionAdd method, which is used inside the getSystemTime method, returns an error, this error is reported.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

If the app wants to receive notifications when the time zone changes and/or the system time changes by a system-defined threshold, it should set subscribe to true. The current system-defined threshold is 5 minutes. 

If the app does not wish to receive notifications of change in time zone and/or the system time changes, it should set subscribe ​ to false.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
subscribedOptionalBoolean

Indicates if subscribed to get notified.

  • true - Subscribed for changes
  • false - Not subscribed
utcRequiredNumber

The number of milliseconds since Epoch (midnight of January 1, 1970 UTC), also know as the Unix time.

localtimeRequiredObject: LocalTime

The object that contains information about the current system time.

offsetRequiredNumber

The number of minutes from UTC. This can be negative for time zones west of UTC, and positive for time zones east of UTC.

timezoneRequiredString

 The current system time zone. It has the same format as the TZ  environment variable. For information, see http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html 

TZRequiredString

 Contains the time zone abbreviation in the standard Unix format, for example PDT (which stands for Pacific Daylight Time). The time zone corresponds to the current time zone of the system.

timeZoneFileRequiredString

Linux zone information file for the currently set zone. For more information, see: http://linux.die.net/man/5/tzfile

timestampOptionalObject: Timestamp

Monotonic timestamp

isDSTOptionalBoolean

Indicates whether the system is currently using Daylight Saving Time (DST). The possible values:

  • True - System is using DST
  • False - System is not using DST

Note: This field is not provided if the DST information is not available.

errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Subscription Returns

Name

Required

Type

Description

utcRequiredNumber

The number of milliseconds since Epoch (midnight of January 1, 1970 UTC), also know as the Unix time.

localtimeRequiredObject: LocalTime

The object that contains information about the current system time.

offsetRequiredNumber

The number of minutes from UTC. This can be negative for time zones west of UTC, and positive for time zones east of UTC.

timezoneRequiredString

 The current system time zone. It has the same format as the TZ  environment variable. For information, see http://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html 

TZRequiredString

 Contains the time zone abbreviation in the standard Unix format, for example PDT (which stands for Pacific Daylight Time). The time zone corresponds to the current time zone of the system.

timeZoneFileRequiredString

Linux zone information file for the currently set zone. For more information, see: http://linux.die.net/man/5/tzfile

NITZValidTimeOptionalBoolean

The NITZValidTime property indicaltes that a valid time was correctly set using NITZ. This value is needed because sometimes the time-zone may be received ahead of the time.

NITZValidZoneOptionalBoolean

The NITZValidZone property indicates that a valid time-zone was correctly set using NITZ. This value is needed because sometimes the time may be received ahead of the time-zone.

isDSTOptionalBoolean

A flag that indicates whether daylight saving time (DST) is in effect at the time described. The value is true if DST is in effect, false if it is not, and absent if the information is not available.

Error References

Error Code

Error Text

Error Description

1Could not get service unique name

Luna-service2 internal error: Can't retrieve unique service name from the message.

1Could not get unique token

Luna-service2 internal error: Can't retrieve unique token from the message

Example

Example of a successful call:

luna-send -P -n 1 -f luna://com.webos.service.systemservice/time/getSystemTime '{}'

{

"timezone": "America/Los_Angeles",

"returnValue": true,

"utc": 1448556823,

"localtime": {

"month": 11,

"day": 26,

"hour": 8,

"minute": 53,

"year": 2015,

"second": 43

},

"TZ": "PST",

"systemTimeSource": "sdp",

"timestamp": {

"source": "monotonic",

"sec": 94520,

"nsec": 767897750

},

"timeZoneFile": "/var/luna/preferences/localtime",

"offset": -480,

"isDST": true

}


time/getSystemTimezoneFile

Description

The getSystemTimezoneFile method returns the path to Linux time-zone information file for the currently set zone. This file contains the list of rules that define switching to and from the daylight saving time. In particular, the time-zone information file defines when the time shift occurs in each particular year.

Note: A call to this method always succeeds. This method does not return returnValue.

Parameters

None

Call Returns

Name

Required

Type

Description

subscribedRequiredString

subscribed will always contain false.

timeZoneFileRequiredString

Path to the system timezone file.

Example

# luna-send -P -n 1 -f luna://com.webos.service.systemservice/time/getSystemTimezoneFile '{}'

{

"subscribed": false,

"timeZoneFile": "/var/luna/preferences/localtime"

}


time/getSystemUptime

Description

The getSystemUptime method returns the number of seconds since the last system boot. This method uses the Linux-specific sysinfo function.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

It contains the POSIX errno value.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

uptimeOptionalNumber

Number of seconds since last system boot.

Error References

Error Code

Error Text

Error Description

14Bad address

Internal error: Invalid sysinfo parameter.

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/time/getSystemUptime '{}'

{

"returnValue": true,

"uptime": 5185

}

 

Example of a failed call:

luna-send -n 1 -f luna://com.webos.service.systemservice/time/getSystemUptime '{}'

{

"returnValue": false,

"errorCode": 14,

"errorText": "Bad address"

}


time/launchTimeChangeApps

Description

The launchTimeChangeApps method executes all methods listed in the timeChangeLaunch list (value of the timeChangeLaunch preference).

The timeChangeLaunch list contains all applications that must be executed when the switching to/from the daylight saving time occurs. These applications are executed automatically, you should not call the launchTimeChangeApps method. However, if for some reason you need to execute these applications apart from the schedule, you can call the the launchTimeChangeApps method.

Note: This method call always succeeds.

Parameters

None

Call Returns

Name

Required

Type

Description

subscribedRequiredString

subscribed will always contain false.

returnValueRequiredBoolean

returnValue will always contain true.
 

Example

Example of a successful call:

luna-send -P -n 1 -f luna://com.webos.service.systemservice/time/launchTimeChangeApps '{}'

{

"subscribed": false,

"returnValue": true

}


time/setBroadcastTime

Description

The setBroadcastTime method sets the broadcast time which is in the broadcast signal. The system service will be notified that the broadcast time must be changed.

Parameters

Name

Required

Type

Description

utcRequiredNumber

UTC time in seconds since epoch.

localRequiredNumber

Seconds since epoch with local time offset (according to broadcast regional offsets table).

timestampOptionalObject: Timestamp

Monotonic timestamp. If set, will be used to calculate a delay between sending and receipt of this request over luna-bus and add that to utc field.

Call Returns

Name

Required

Type

Description

returnValueRequiredNumber

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

-2Failed to update broadcast time offsets

Failed to update broadcast time offsets

1Could not validate json message against schema

The request data is invalid.

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/time/setBroadcastTime '{"utc": 1418745990, "local": 1418727638 }'


time/setSystemNetworkTime

Description

The setSystemNetworkTime method is used to send a NITZ messages to Luna System Service. A NITZ message contains the local time and date, time zone and DST offset, as well as network provider identity. NITZ can be used to update the system clock of network devices.

This method ic called by the service, which receives the time data from the service provider (on cell phones - from GSM provider, for TV sets - from the signal broadcaster).

  • While Airplanmode is off, if Device's timezone setting is off and user manually select the timezone, then when NITZ message arrives, it will use the timezone specified by the device to calculate for times. Time is always the unix time in seconds.
  • If Airplane mode is off and both device's Networktimezone & NetworkTime are off, then NITZ message is ignored.
  • If Airplane mode is off and NetworkTime is off and NetworkTimezone is on then time is calculated based on current device time offset by current NetworkTimezone. (i.e device is 3pm pacific time with NetworkTime off, then device is traveled to NewYork while in Airplanemode, once arrive in Newyork, turnoff Airplanemode, time is calculated by taking device current time offset by NewYork timezone (it ignores networktime).

Note: Prior to using this service to send a fake nitz message to LunaSysService, device must be in AirplaneMode and NetworkTime and Network TimeZone must be turned on.

Parameters

Name

Required

Type

Description

secRequiredString

GMT second.

minRequiredString

GMT minute.

hourRequiredString

GMT hour.

mdayRequiredString

Day of the month.

monRequiredString

Month of the year, 0 - 11.

yearRequiredString

Year calculated from 1900, for example 2012 - 1900 = 112.

offsetRequiredString

Offset from GMT time in minutes.

mccRequiredString

Country code.

mncRequiredString

Network code assign to carrier within a country

tzvalidRequiredBoolean

Is set to true of if timezone is valid. If false, mcc and offset are used to calculate time.

timevalidRequiredBoolean

Is time valid.

dstvalidRequiredBoolean

Is daylight saving time in use.

dstRequiredNumber (int32_t)

If this is 1, month needs to be set within the timeframe of DaylightSavingTime (~April - ~Septermber). If this is 0, months needs to be specified outside of DaylightSavingTime ( ~November - February).

timestampRequiredString

Timestamp of current time. Can be number of ticks from system boot. The number is used to calculate delay of message delivery

tilIgnoreRequiredBoolean

Set as true if you wish to test this service with a fake NITZ message.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

Nonenitz message failed ...

Failed to handle this NITZ message at some stage

1Could not validate json message against schema

The request data is invalid.

Example

Example of a successful call:

luna-send -f -n 1 luna://com.webos.service.systemservice/time/setSystemNetworkTime

'{

"sec":"30",

"min":"15",

"offset":"-480",

"hour":"2",

"dst":1,

"tzvalid":true,

"dstvalid":true,

"mon":"6",

"year":"111",

"timevalid":true,

"mday":"1",

"mcc":"310",

"mnc":"26",

"tilIgnore":true,

"timestamp":"123"

}'

{

"returnValue": true

}


time/setSystemTime

Description

The setSystemTime method sets the Linux system-wide time effectively overriding any previous synchronization with any time source.

Note: this API might not change system time returned by getSystemTime. It depends on manualOverride and useNetworkTime preferences.

Parameters

Name

Required

Type

Description

utcRequiredNumber

The number of milliseconds since Epoch (midnight of January 1, 1970 UTC), aka - Unix time.

timestampOptionalObject: Timestamp

Monotonic timestamp. If set, will be used to calculate a delay between sending and receipt of this request over luna-bus and add that to the utc field.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

FAILaccessing utc integer value failed

The utc key is missing.

1Could not validate json message against schema

The request data is invalid.

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/time/setSystemTime '{"utc": 1418745990 }'


time/setTimeChangeLaunch

Description

The setTimeChangeLaunch method adds an application to, or removes it from the timeChangeLaunch list.

The timeChangeLaunch list contains the applications that are automatically executed by the system when the switch to or from the daylight saving time occurs.

Parameters

Name

Required

Type

Description

appIdRequiredString

Application ID.

activeRequiredBoolean

If true, adds the application to the launch list. If false, the application is removed.

parametersRequiredObject

Launch parameters for the application.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

Nonecannot deactivate an appId that isn't in the list

AppID is not in the list

1Could not validate json message against schema

The request data is invalid.

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/time/setTimeChangeLaunch

'{

"appId": "com.webos.app.someApp",

"active": true,

"parameters": { "param1": "foo", "param2": "bar" }

}'

{

"subscribed": false,

"returnValue": true

}


time/setTimeWithNTP

Description

The setTimeWithNTP methods synchronizes the system time with the NTP.

Note: This method call always succeeds.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Always true

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/time/setTimeWithNTP '{}'

{

"returnValue": true

}


timezone/getTimeZoneFromEasData

Description

The getTimeZoneFromEasData method gets the time-zone that matches the provided EAS data. This method enables you to determine the time zone by the speicified time stamp.

Parameters

Name

Required

Type

Description

biasRequiredNumber

Number of minutes that a time zone is offset from Coordinated Universal Time (UTC).

standardDateOptionalObject: EasLocalTime

Object containing date and time information in standard time. If any of the fields for EasLocalTime structure are missing or out of range, this field is ignored as not specified. This field should be specified in combination with daylightDate. If either standardDate or daylightDate is not specified, both fields are ignored as not specified.

standardBiasOptionalNumber

The standardBias is the bias value to be used for local time translations that occur during standard time. This value is added to the value of the bias member to form the bias used during standard time. In most time zones, the value is zero. This field is not used in calculations for the moment.

daylightDateOptionalObject: EasLocalTime

The daylightDate is an object containing the date and time information in daylight saving time. If any of the fields for EasLocalTime structure are missing or out of range, this field is ignored as not specified. This field should be specified in combination with standardDate. If either standardDate or daylightDate is not specified, both are ignored as not specified.

daylightBiasOptionalNumber

The dayLightBias is the bias value to be used for local time translations that occur during daylight saving time. This value is added to the value of the bias member to form the bias used during daylight saving time. In most time zones, the value is –60. This field is not used in calculations for the moment.

Call Returns

Name

Required

Type

Description

timeZoneRequiredString

The timezone matching the given parameters.

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

NoneFailed to find timeZone preference

Failed to find timezone preference

NoneFailed to find any timezones with specified bias value

Failed to find any timezones with specified bias value

NoneFailed to find any timezones with specified parametes

Failed to find any timezones with specified parameters

1Could not validate json message against schema

The request data is invalid.

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/timezone/getTimeZoneFromEasData '{ "bias": -60 }'


timezone/getTimeZoneRules

Description

The getTimeZoneRules method requests rules for specific time-zone for the specified years. By calling this method you can get the rules of when and how the daylight time switching occurs at the specified year.

Parameters

Name

Required

Type

Description

tzRequiredString

The timezone for which to get information.

yearsOptionalNumber array

Array of years for which to get information. If not specified, information for the current year is returned.

Call Returns

Name

Required

Type

Description

resultsRequiredObject array: TimeZoneRule

Object array for the results.

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check  "errorText" field for details
errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

0Cannot parse json payload. Json root needs to be an array

The request JSON data is invalid.

0Missing tz entry or entry is not a string

The request data is invalid.

0years entry is not array

The request data is invalid.

0entry in years array is not integer

The request data is invalid.

Example

Example of a successful call:

luna-send -n 1 -f luna://com.webos.service.systemservice/timezone/getTimeZoneRules '[ {"tz": "Europe/Helsinki", "years": [2012, 2010]} ]'

{

"returnValue": true,

"results": [

{

"tz": "Europe/Helsinki",

"dstOffset": 10800,

"dstStart": 1332637200,

"dstEnd": 1351386000,

"utcOffset": 7200,

"year": 2012,

"hasDstChange": true

},

{

"tz": "Europe/Helsinki",

"dstOffset": 10800,

"dstStart": 1269738000,

"dstEnd": 1288486800,

"utcOffset": 7200,

"year": 2010,

"hasDstChange": true

}

]

}


timezone/createTimeZoneFromEasData

Description

Create a manual timezone named "Etc/Manual" and specify details of this timezone.

After creating the timezone, enable it by using the following command: 

luna-send -n 1 -f luna://com.webos.service.systemservice/setPreferences '{"timeZone": {"ZoneID": "Etc/Manual"}}'

Parameters

Name

Required

Type

Description

biasOptionalNumber

Number of minutes that the manual timezone is offset from Coordinated Universal Time (UTC).

standardDateOptionalObject: TimeZoneEasRule

Date and local time when Daylight Saving Time (DST) transitions to standard time.

Note: This field must be specified in combination with the daylightDate parameter. If either of these parameters is not specified, both the fields are ignored.

standardBiasOptionalNumber

The bias value to be used during local time translations that occur during standard time. This value is added to the value of the bias parameter to form the bias used during standard time.

Default value: 0 (in most time zones this value is 0)

Note: This parameter is ignored if the standardDate parameter is not specified.

daylightDateOptionalObject: TimeZoneEasRule

Date and local time when standard time transitions to Daylight Saving Time (DST).

Note: This field must be specified in combination with the standardDate parameter. If either of these parameters is not specified, both fields are ignored.

daylightBiasOptionalNumber

The bias value to be used during local time translations that occur during daylight saving time. This value is added to the value of the bias parameter to form the bias used during daylight saving time.

Default value: -60 (in most time zones this value is -60)

Note: This parameter is ignored if the daylightDate parameter is not specified.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error References

Error Code

Error Text

Error Description

1Could not validate json message against schema

The request data is invalid

0DST duration is too short

DST duration is too short

Example

# luna-send -n 1 -f luna://com.webos.service.systemservice/timezone/createTimeZoneFromEasData  

'{

    "standardDate":

    {

        "month": 10,

        "dayOfWeek": 0,

        "week": 3,

        "hour": 2

    },

    "daylightDate":

    {

        "month": 7,

        "dayOfWeek": 0,

        "week": 1,

        "hour": 0

    }

}'


Objects

TimeSourceOffset

Details about the offset from one of the time-sources.

Example: 

"offset": {
   "source": "system",
   "value": 0
}

Name

Required

Type

Description

value Required Number

Offset in seconds from the time-source.

source Required String

Time source identifier (for example system, manual, etc). Only system is returned for the moment.

LocalTime

This object provides details of the current system time.

Example:

"localtime": {
   "month": 12,
   "day": 16,
   "hour": 11,
   "minute": 0,
   "year": 2014,
   "second": 38
}

Name

Required

Type

Description

year Required Number

The year.

month Required Number

The month (1-12).

dayOfWeek Optional Number

Day of the week (0 - 6).

day Required Number

The day (1 - 31).

hour Required Number

The hour (0 - 23).

minute Required Number

 The minute (0 - 59).

second Required Number

The second (0 - 59 or 60 for leap seconds).

EasLocalTime

This object provides details of the EAS time structure.

Example:

"standardDate": {
   "month": 12,
   "day": 3,
   "dayOfWeek": 2,
   "hour": 11,
   "minute": 0,
   "year": 2014,
   "second": 38
}

Name

Required

Type

Description

year Optional Number

The year. Default value is current year

month Required Number

The month (1-12).

dayOfWeek Required Number

Day of the week (0 - 6). 0 is for Sunday, 1 - for Monday and so on to 6 - for Saturday

day Required Number

Occurrence of the day of the week within the month (1 - 5).

hour Required Number

The hour (0 - 23).

minute Optional Number

The minute (0 - 59). Default value is 0

second Optional Number

The second (0 - 59). Default value is 0

TimeZoneRule

Contains the rule to be used when DST(daylight saving time) is enabled for a particular zone.

Example:

{
   "tz": "Europe/Helsinki",
   "dstOffset": 10800,
   "dstStart": 1332637200,
   "dstEnd": 1351386000,
   "utcOffset": 7200,
   "year": 2012,
   "hasDstChange": true
}

Name

Required

Type

Description

tz Optional String

The timezone.

year Optional Number

The year.

hasDstChange Optional Boolean

True if daylight saving time is in use in this timezone.

utcOffset Required Number

Time difference from UTC time in seconds.

dstOffset Optional Number

Time difference from UTC time in seconds during daylight saving time.

dstStart Optional Number

The time when daylight saving time starts during the year, presented in Unix time.

dstEnd Optional Number

The time when daylight saving time ends during the year, presented in Unix time. 

ImageConversionResult

Contains details of the converted image.

Example:

{
   "src": "/usr/lib/luna/system/luna-systemui/images/opensearch-small-icon.png",
   "dest": "/tmp/convertedimage.png",
   "destType": "jpg"
}

Name

Required

Type

Description

source Optional String

Path to the original file.

dest Required String

Path to the output file.

destType Required String

Type of the output file: jpg, png or bmp.

Timestamp

Contains details of the timestamp.

Name

Required

Type

Description

source Required String

Source of the timestamp. For example monotonic, etc.

Note: currently only monotonic is used.

sec Required Number

Seconds for the timestamp

nsec Required Number

Nanoseconds for the timestamp

TimeZoneEasRule

Provides details of structure for creating a timezone rule.

Example:

{
   "year": 2016,
   "month": 10,
   "dayOfWeek": 0,
   "week": 3,
   "hour": 2
}

Name

Required

Type

Description

year Optional Number

The year

month Required Number

The month. Possible values are 1 - 12.

dayOfWeek Required Number

Day of week. Possible values are 0 - 6, where 0 is Sunday and 6 is Saturday.

week Required Number

Week of the month. Possible values are 1 - 5, where 1 is the 1st week and 5 is the last or 5th week of month.

hour Required Number

The hour. Possible values are 0 - 23.

minute Optional Number

The minute (0-59)

second Optional Number

The second (0-59). Default value is 0


Except as noted, this content is licensed under Creative Commons Attribution 4.0 and sample code is licensed under Apache License 2.0.