|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.applicationblocks.com.CfgBase
com.genesyslab.platform.applicationblocks.com.CfgObject
com.genesyslab.platform.applicationblocks.com.objects.CfgTimeZone
public class CfgTimeZone
Time Zones are predefined objects that provide CTI applications with information about world time zones. Each object describes one time zone.
time_t = int
or long
i.e.
32 bit value at least
The time_t
type logically divided into several
sections, following bit-mask should be used to get an info:
Bits | Description | Range | Comments |
---|---|---|---|
0-3 | Month, | 0-12; | DST is not Observed=0 |
Jan=1 | |||
Dec=12 | |||
####### | Week | 0-5, 7 | DST is not observed or week is not specified= 0 |
Last week of month = 7 | |||
Note: | |||
The day of last week of month=week will be set to 7, if the day of week does not occur on last week | |||
The day of last week of month=week will be set to 1, if the day of week does not occur on first week | |||
####### | Day | 0-31, 63 | DST is not observed = 0 |
Last day of month = 63 | |||
If week is specified (week!=0) the range should be 1-7 | |||
Sun=1 | |||
Sat=7 | |||
13-18 | Start_time, Stop_Time | 0-47 in 30 minute units | 1:00 am = 2 |
19-24 | Year (shift from 2000) | 0, 1-38, 39-63 | Only if Time Zone is defined for specific Year. 2001 = 1 |
DST is not observed or year is not specified=0 | |||
Values within range 39-63 are not valid | |||
25-30 | reserved | reserved | reserved |
####### | A flag to recognize custom/6.0 time zone | reserved | Has to be used to distinguish custom time zones and time zones created before release 6.1: |
New Style = 1 | |||
Old Style or custom time zone = 0 |
name | Description | offset | IsDST | Month | Week | Date | Time_start | Month | Week | Date | Time_stop | Year |
---|---|---|---|---|---|---|---|---|---|---|---|---|
GMT | Greenwich Mean Time | 0 | TRUE | 3 | 7 | 1 | 4 | 10 | 7 | 1 | 6 | 0 |
ECT | European Central Time | 2 | TRUE | 3 | 7 | 1 | 4 | 10 | 7 | 1 | 6 | 0 |
EET | Eastern European Time | 4 | TRUE | 3 | 7 | 1 | 6 | 10 | 7 | 1 | 8 | 0 |
ART | (Arabic) Egypt Standard Time | 4 | TRUE | 4 | 7 | 6 | 0 | 9 | 7 | 6 | 0 | 0 |
EAT | Eastern African Time | 6 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
MET | Middle East Time | 7 | TRUE | 3 | 0 | 20 | 0 | 9 | 0 | 22 | 0 | 0 |
NET | Near East Time | 8 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
PLT | Pakistan Lahore Time | 10 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
IST | India Standard Time | 11 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
BST | Bangladesh Standard Time | 12 | TRUE | 3 | 7 | 1 | 0 | 10 | 7 | 1 | 0 | 0 |
VST | Vietnam Standard Time | 14 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
CTT | China Taiwan Time | 16 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
JST | Japan Standard Time | 18 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
KST | Korea Standard Time | 18 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ACT | Australia Central Time | 19 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
AET | Australia Eastern Time | 20 | TRUE | 8 | 7 | 7 | 4 | 3 | 7 | 1 | 4 | 0 |
SST | Solomon Standard Time | 22 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
NST | New Zealand Standard Time | 24 | TRUE | 10 | 1 | 1 | 4 | 3 | 3 | 1 | 6 | 0 |
MIT | Midway Islands Time | -22 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
HST | Hawaii Standard Time | -20 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
AST | Alaska Standard Time | -18 | TRUE | 4 | 1 | 1 | 4 | 10 | 7 | 1 | 4 | 0 |
PST | Pacific Standard Time | -16 | TRUE | 4 | 1 | 1 | 4 | 10 | 7 | 1 | 4 | 0 |
PNT | Phoenix Standard Time | -14 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
MST | Mountain Standard Time | -14 | TRUE | 4 | 1 | 1 | 4 | 10 | 7 | 1 | 4 | 0 |
CST | Central Standard Time | -12 | TRUE | 4 | 1 | 1 | 4 | 10 | 7 | 1 | 4 | 0 |
EST | Eastern Standard Time | -10 | TRUE | 4 | 1 | 1 | 4 | 10 | 7 | 1 | 4 | 0 |
IET | Indiana Eastern Standard | -10 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
PRT | Puerto Rico and US Virgin Islands Time | -8 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
CNT | Canada Newfoundland Time | -7 | TRUE | 4 | 1 | 1 | 4 | 10 | 7 | 1 | 4 | 0 |
AGT | Argentina Standard Time | -6 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
BET | Brazil Eastern Time | -6 | TRUE | 10 | 2 | 1 | 0 | 2 | 7 | 1 | 0 | 0 |
CAT | Central African Time | -2 | FALSE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
AtlST | Atlantic Standard Time | -8 | TRUE | 4 | 1 | 1 | 4 | 10 | 7 | 1 | 4 | 0 |
DSTStartTime / DSTStopTime
can be
calculated using function ConfCalculateTimeZone()
.
DSTStartTime / DSTStopTime
represent a calendar value, not a local time at any particular timezone. In order to use this calculated value one can call gmtime()
function in C/C++ runtime library to get the value parsed into tm
structure. Note, however, that resulted value is not a GMT time of transition, but again a calendar value, applicable for the configured timezone. In this case tm
structure and gmtime()
function have being reused only to parse configuration, without inheriting their meaning from runtime library. You should be careful when applying any translations, because functions of runtime library that accept a time_t
value usually perform additional interpretation of that value as either local or universal time (while actual value in this case is, in fact, just a calendar item, not a time). For instance, you cannot use mktime()
or even _mkgmtime() - windows
to convert this value back into time_t
, because first assume you have a local time that need to be recalculated to GMT by changing timezone, while second give you much closer result (because it will not count for timezone) but might add/subtract one hour from result, due to its DST-awareness. You should not attempt to convert it back and you should use content of tm
structure as a configuration information (including day, month, year fields) and treat this information as applicable for a timezone for that this information is supplied.
Field Summary | |
---|---|
static CfgObjectType |
OBJECT_TYPE
|
Constructor Summary | |
---|---|
CfgTimeZone(IConfService confService)
This constructor is intended for creation of detached objects. |
|
CfgTimeZone(IConfService confService,
ConfObject objData,
boolean isSaved,
java.lang.Object[] additionalParameters)
This constructor is intended for creation of objects from configuration protocol messages. |
|
CfgTimeZone(IConfService confService,
org.w3c.dom.Node xmlData,
java.lang.Object[] additionalParameters)
This constructor is intended for creation of objects from configuration protocol messages. |
Method Summary | |
---|---|
java.lang.Integer |
getDBID()
An identifier of this object in the Configuration Database. |
java.lang.String |
getDescription()
A pointer to time zone description. |
java.lang.Integer |
getDSTOffset()
The value of DST offset. |
java.util.Calendar |
getDSTStartDate()
DST start date. |
java.util.Calendar |
getDSTStopDate()
DST stop date. |
CfgFlag |
getIsDSTObserved()
|
java.lang.String |
getName()
A pointer to time zone name. |
java.lang.String |
getNameMSExplorer()
A pointer to the time zone name used by Microsoft browser. |
java.lang.String |
getNameNetscape()
A pointer to the time zone name used by Netscape Navigator browser. |
java.lang.Integer |
getOffset()
A time zone offset. |
CfgObjectState |
getState()
Current object state. |
CfgTenant |
getTenant()
A unique identifier of the
CfgTenant
to which this time zone is allocated. |
java.lang.Integer |
getTenantDBID()
Retrieves the dbid of the object that is being linked to by the Tenant property. |
KeyValueCollection |
getUserProperties()
A pointer to the list of user-defined properties.Parameter userProperties has the following structure: Each key-value pair of the primary list (TKVList *userProperties) uses the key for the name of a user-defined section, and the value for a secondary list, that also has the TKVList structure and specifies the properties defined within that section. |
void |
save()
Synchronizes changes in the class with Configuration Server. |
void |
setDBID(java.lang.Integer value)
An identifier of this object in the Configuration Database. |
void |
setDescription(java.lang.String value)
A pointer to time zone description. |
void |
setDSTOffset(java.lang.Integer value)
The value of DST offset. |
void |
setDSTStartDate(java.util.Calendar value)
DST start date. |
void |
setDSTStopDate(java.util.Calendar value)
DST stop date. |
void |
setIsDSTObserved(CfgFlag value)
|
void |
setName(java.lang.String value)
A pointer to time zone name. |
void |
setNameMSExplorer(java.lang.String value)
A pointer to the time zone name used by Microsoft browser. |
void |
setNameNetscape(java.lang.String value)
A pointer to the time zone name used by Netscape Navigator browser. |
void |
setOffset(java.lang.Integer value)
A time zone offset. |
void |
setState(CfgObjectState value)
Current object state. |
void |
setTenant(CfgTenant value)
A unique identifier of the
CfgTenant
to which this time zone is allocated. |
void |
setTenantDBID(int dbid)
A unique identifier of the
CfgTenant
to which this time zone is allocated. |
void |
setUserProperties(KeyValueCollection value)
A pointer to the list of user-defined properties.Parameter userProperties has the following structure: Each key-value pair of the primary list (TKVList *userProperties) uses the key for the name of a user-defined section, and the value for a secondary list, that also has the TKVList structure and specifies the properties defined within that section. |
Methods inherited from class com.genesyslab.platform.applicationblocks.com.CfgObject |
---|
clone, delete, doSetFolderId, ensureDataBackup, getFolderId, getObjectDbid, getObjectPath, getObjectType, refresh, reloadObjectWithNewData, reloadObjectWithNewData, removeAccount, resetDataBackup, retrieveAccountPermissions, retrieveACL, retrievePermissions, setAccountPermissions, setAccountPermissions, setFolderId, update, updateACL |
Methods inherited from class com.genesyslab.platform.applicationblocks.com.CfgBase |
---|
equals, flushChildrenContent, getConfigurationService, getData, getEndpoint, getLinkListCollection, getLinkValue, getLogger, getMetaData, getParent, getProperty, getProperty, getProperty, getRawObjectData, hashCode, initStruct, isSaved, lockObject, resolveLink, setProperty, toString, toStringProperties, toXml, updateChildrenSavedState |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.genesyslab.platform.applicationblocks.com.ICfgBase |
---|
getEndpoint, getProperty, getRawObjectData, setProperty, toXml |
Field Detail |
---|
public static final CfgObjectType OBJECT_TYPE
Constructor Detail |
---|
public CfgTimeZone(IConfService confService, ConfObject objData, boolean isSaved, java.lang.Object[] additionalParameters)
confService
- configuration service instanceobjData
- configuration protocol object data structureisSaved
- indicator of the object saved stateadditionalParameters
- additional parameters from configuration protocol messagepublic CfgTimeZone(IConfService confService, org.w3c.dom.Node xmlData, java.lang.Object[] additionalParameters)
confService
- configuration service instancexmlData
- XML object containing object dataadditionalParameters
- additional parameters from configuration protocol messagepublic CfgTimeZone(IConfService confService)
confService
- configuration service instanceMethod Detail |
---|
public void save() throws ConfigException
save
in interface ICfgObject
save
in class CfgObject
ConfigException
- in case of protocol level exception, data transformation,
or server side constraintspublic final java.lang.Integer getDBID()
public final void setDBID(java.lang.Integer value)
value
- new property valuegetDBID()
public final CfgTenant getTenant()
CfgTenant
to which this time zone is allocated. Mandatory. Once specified,
cannot be changed.
public final void setTenant(CfgTenant value)
CfgTenant
to which this time zone is allocated. Mandatory. Once specified,
cannot be changed.
value
- new property valuegetTenant()
public final void setTenantDBID(int dbid)
CfgTenant
to which this time zone is allocated. Mandatory. Once specified,
cannot be changed.
dbid
- DBID identifier of referred objectgetTenant()
public final java.lang.Integer getTenantDBID()
public final java.lang.String getName()
public final void setName(java.lang.String value)
value
- new property valuegetName()
public final java.lang.String getDescription()
public final void setDescription(java.lang.String value)
value
- new property valuegetDescription()
public final java.lang.Integer getOffset()
public final void setOffset(java.lang.Integer value)
value
- new property valuegetOffset()
public final CfgFlag getIsDSTObserved()
public final void setIsDSTObserved(CfgFlag value)
public final java.util.Calendar getDSTStartDate()
public final void setDSTStartDate(java.util.Calendar value)
value
- new property valuegetDSTStartDate()
public final java.util.Calendar getDSTStopDate()
public final void setDSTStopDate(java.util.Calendar value)
value
- new property valuegetDSTStopDate()
public final java.lang.String getNameNetscape()
public final void setNameNetscape(java.lang.String value)
value
- new property valuegetNameNetscape()
public final java.lang.String getNameMSExplorer()
public final void setNameMSExplorer(java.lang.String value)
value
- new property valuegetNameMSExplorer()
public final CfgObjectState getState()
CfgObjectState
public final void setState(CfgObjectState value)
CfgObjectState
value
- new property valuegetState()
public final KeyValueCollection getUserProperties()
public final void setUserProperties(KeyValueCollection value)
value
- new property valuegetUserProperties()
public final java.lang.Integer getDSTOffset()
public final void setDSTOffset(java.lang.Integer value)
value
- new property valuegetDSTOffset()
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |