D0301
HTML Application SDK  A1.8
Public Member Functions | List of all members
DateTimeSettings Interface Reference

import"DateTimeSettingsPlugin.idl";

Public Member Functions

Integer getLocalCTime ()
 
Integer getTimeZoneCount ()
 
String getTimeZoneMode ()
 
Integer getTimeZoneOffset ()
 
Integer getUTCCTime ()
 
Boolean isBroadcastTimeKnown ()
 
Boolean setCurrentDateTime ([in] Integer current_date_time)
 
Boolean setTimeZoneMode ([in] String timezone_mode)
 
Boolean setTimeZoneOffset ([in] Integer timezone_offset)
 

Detailed Description

This is a class which implements global DateTimeSettings object.

Member Function Documentation

Integer DateTimeSettings.getLocalCTime ( )

This function gets Local time.

var gotLocal = DateTimeSettings.getLocalCTime();
Returns
CTime value
Integer DateTimeSettings.getTimeZoneCount ( )

This function gets total timezone offset count.

var gotTimeZoneCount = DateTimeSettings.getTimeZoneCount();
Returns
Return count of timezone offsets
String DateTimeSettings.getTimeZoneMode ( )

This function gets timezone mode.

var testTzMode = DateTimeSettings.getTimeZoneMode();
Returns
Return timezone mode 'AUTO' or 'MANUAL'
Integer DateTimeSettings.getTimeZoneOffset ( )

This function gets timezone offset value.

var gotTimeZoneOffset = DateTimeSettings.getTimeZoneOffset();
Returns
Return timezone offset value
Integer DateTimeSettings.getUTCCTime ( )

This function gets UTC time.

var gotUTC = DateTimeSettings.getUTCCTime();
Returns
CTime value
Boolean DateTimeSettings.isBroadcastTimeKnown ( )

This function checks whether broadcast time is known or not.

var isBroadcastTime = DateTimeSettings.isBroadcastTimeKnown();
Returns
Return true if Broadcast time is known
Boolean DateTimeSettings.setCurrentDateTime ( [in] Integer  current_date_time)

This function sets current date time. Invalid type of parameter throws runtime error.

var referenceLocalTime = 1485175812; //Mon, 23 Jan 2017 12:50:12
var ret = DateTimeSettings.setCurrentDateTime(referenceLocalTime);
Parameters
current_date_timeCtime of the current time. Platform does not support dates earlier than Sat, 01 Jan 2000 00:00:01
Returns
Return true if operation is completed succesfully
Boolean DateTimeSettings.setTimeZoneMode ( [in] String  timezone_mode)

This function sets timezone mode (AUTO, MANUAL).

var ret = DateTimeSettings.setTimeZoneMode("AUTO");
Parameters
timezone_modeThe available modes are 'AUTO' and 'MANUAL' as a string parameter.
Returns
Return true if operation is completed succesfully
Boolean DateTimeSettings.setTimeZoneOffset ( [in] Integer  timezone_offset)

This function sets timezone offset and overrides timezone mode to manual mode if necessary.
Since time zone offset is changed by plugin instead of standart javascript Date object, changes may not be seen directly while using standart javascript Date functions. If setTimeZoneOffset is used then getTimeZoneOffset must be used to get the timezone offset correctly
Supported timezone offsets are:
{ -12*3600, -11*3600, -10*3600, -9*3600, -8*3600, -7*3600, -6*3600, -5*3600, -4*3600, -3.5*3600, -3*3600, -2*3600, -1*3600, 0, 1*3600, 2*3600, 3*3600, 3.5*3600, 4*3600, 4.5*3600, 5*3600, 5.5*3600, 5.75*3600, 6*3600, 6.5*3600, 7*3600, 8*3600, 9*3600, 9.5*3600, 10*3600, 10.5*3600, 11*3600, 12*3600 }

Parameters
timezone_offsetTimezone offset in seconds.
Returns
Return true if operation is completed succesfully

The documentation for this interface was generated from the following file: