Skip to content

TimeService

Method LwM2M request Description
getNtpServer get /1024//77
alias: /time/ntp-server
Get NTP server name
putNtpServer put /1024//77
alias: /time/ntp-server
Put NTP server name
getTimeZone get /1024//78
alias: /time/time-zone
Get Tap time zone
putTimeZone put /1024//78
alias: /time/time-zone
Put Tap time zone
getLocalTime get /1024//79
alias: /time/local-time
Get Tap local time

getNtpServer

Minimal Tap Firmware version: 1.107

Get NTP server name

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.time.getNtpServer();
const value = response.body();
console.log(`getNtpServer: ${value}`);

putNtpServer

Minimal Tap Firmware version: 1.107

Put NTP server name

Parameters

Name Type Description Notes
serverName string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const serverName = ...;
const response = await tap.service.time.putNtpServer(serverName);
const value = response.body();
console.log(`putNtpServer: ${value}`);

getTimeZone

Minimal Tap Firmware version: 1.107

Get Tap time zone

Parameters

This endpoint does not need any parameter.

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.time.getTimeZone();
const value = response.body();
console.log(`getTimeZone: ${value}`);

putTimeZone

Minimal Tap Firmware version: 1.107

Put Tap time zone

Parameters

Name Type Description Notes
serverName string optional

Returns

Nothing

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const serverName = ...;
const response = await tap.service.time.putTimeZone(serverName);
const value = response.body();
console.log(`putTimeZone: ${value}`);

getLocalTime

Minimal Tap Firmware version: 1.107

Get Tap local time

Parameters

This endpoint does not need any parameter.

Returns

LocalTime

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const response = await tap.service.time.getLocalTime();
const value = response.body();
console.log(`getLocalTime: ${value}`);