mobicontrol.time

This namespace provides access to date and time settings.
Since:

Methods

static disableAutomaticTime()

Turn off the automatic time setting.

Note: Not supported on Work Profile configurations.
On certain Samsung devices, this function also disables the automatic time zone setting.

Throws:
Since:

static disableAutomaticTimeZone()

Turn off the automatic time zone setting.

Note: Not supported on Work Profile configurations.
On certain Samsung devices, this function also disables the automatic time setting.

Throws:
Since:

static enableAutomaticTime()

Turn on the automatic time setting.

Note: Not supported on Work Profile configurations.
On certain Samsung devices, this function also enables the automatic time zone setting.

Throws:
Since:

static enableAutomaticTimeZone()

Turn on the automatic time zone setting.

Note: Not supported on Work Profile configurations.
On certain Samsung devices, this function also enables the automatic time setting.

Throws:
Since:

static getTimeZone() → {string}

Get time zone.
Throws:
Returns:
string - The time zone on the device, in IANA format.
Since:

static isAutomaticTimeEnabled() → {boolean}

Get the state of the automatic time setting.
Throws:
Returns:
boolean - true if automatic time is enabled and false otherwise.
Since:

static isAutomaticTimeZoneEnabled() → {boolean}

Get the state of the automatic time zone setting.
Throws:
Returns:
boolean - true if automatic time zone is enabled and false otherwise.
Since:

static setTime(date)

Set device time.

Note: If automatic time is enabled, it will be disabled before setting the time.

Parameters:
Name Type Description
date Date The date and time to set on the device.
Throws:
Since:
Example
var date = new Date("2026-01-16T00:00:00-05:00");
mobicontrol.time.setTime(date);

static setTimeZone(timeZone)

Set time zone.

Note: If automatic time zone is enabled, it will be disabled before setting the zone.

Parameters:
Name Type Description
timeZone string The time zone to set on the device, in IANA format.
Throws:
Since:
Example
mobicontrol.time.setTimeZone("America/Toronto");