Class TimeZoneData
Inherited Members
Namespace: SuperOffice.CRM
Assembly: SoCore.dll
Syntax
[DataContract(Namespace = "http://www.superoffice.net/ws/crm/NetServer/11.9.0.0")]
public class TimeZoneData
Constructors
TimeZoneData()
Default constructor
Declaration
public TimeZoneData()
TimeZoneData(int, string, string, string, int)
Constructor
Declaration
public TimeZoneData(int tzLocationId, string name, string tzLocationCode, string tzLocationCities, int isoNumber)
Parameters
| Type | Name | Description |
|---|---|---|
| int | tzLocationId | |
| string | name | |
| string | tzLocationCode | |
| string | tzLocationCities | |
| int | isoNumber |
Properties
IsoNumber
Country ISO code associated with location: 578
Declaration
[DataMember]
public int IsoNumber { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
MachineTimeZone
Get definition of the local machines TimeZone
Declaration
public static TimeZoneData MachineTimeZone { get; }
Property Value
| Type | Description |
|---|---|
| TimeZoneData |
Name
Name associated with the location: Country name + region name, Norway, United States - Alaska
Declaration
[DataMember]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TZLocationCities
Cities associated with location: Oslo, London, Rio de Janeiro
Declaration
[DataMember]
public string TZLocationCities { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TZLocationCode
Code associated with location: UTC, AR-NQ, AU-QLD, PF2A Not the an ISO country code. Unique.
Declaration
[DataMember]
public string TZLocationCode { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TZLocationID
Timezone location ID - primary key.
Declaration
[DataMember]
public int TZLocationID { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
TimeZoneDSTRules
Dictionary of Daylight saving time rules
Declaration
[DataMember]
public TimeZoneRuleDictionary TimeZoneDSTRules { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeZoneRuleDictionary |
TimeZoneSTDRules
Dictionary of standard rules
Declaration
[DataMember]
public TimeZoneRuleDictionary TimeZoneSTDRules { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeZoneRuleDictionary |
Methods
AddDSTRule(DateTime, int, int, int, int, int)
Add rules to daylight saving time dictionary
Declaration
public void AddDSTRule(DateTime validFrom, int tzOffset, int startDay, int startMonth, int endDay, int endMonth)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | validFrom | The date the rules is valid from |
| int | tzOffset | Timezone offset |
| int | startDay | |
| int | startMonth | |
| int | endDay | |
| int | endMonth |
AddDSTRule(DateTime, int, string, string)
Add rules to daylight saving time dictionary
Declaration
public void AddDSTRule(DateTime validFrom, int tzOffset, string startRulePattern, string endRulePattern)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | validFrom | The date the rules is valid from |
| int | tzOffset | Timezone offset |
| string | startRulePattern | Daylight saving time start pattern |
| string | endRulePattern | Daylight saving time end pattern |
AddSTDRule(DateTime, int)
Add rules to Standard rules dictionary
Declaration
public void AddSTDRule(DateTime validFrom, int tzOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | validFrom | The date the rule is valid from |
| int | tzOffset | Timezone offset |
GetTZOffset(DateTime)
Offset adjusted for DayLightSavingstime
get valid STDrule get valid DSTrule if DSTrule get DSTrule date range check if indate is inside range if(inside range) return DSTOffset if(STDrule) return STDOffset
Declaration
public int GetTZOffset(DateTime inDate)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | inDate |
Returns
| Type | Description |
|---|---|
| int |
GetValidDSTRule(DateTime)
Get daylight savings rule for a given date
Declaration
public TimeZoneRule GetValidDSTRule(DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | date | The date used to get correct rule |
Returns
| Type | Description |
|---|---|
| TimeZoneRule | The daylight savings rule for the given date |
GetValidSTDRule(DateTime)
Get standard rule for a given date
Declaration
public TimeZoneRule GetValidSTDRule(DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | date | The date used to get correct rule |
Returns
| Type | Description |
|---|---|
| TimeZoneRule | The standard rule for the given date |
GetiCalStandardPattern(DateTime)
Declaration
public string GetiCalStandardPattern(DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | date |
Returns
| Type | Description |
|---|---|
| string |
IsDayLightSavingsTime(DateTime)
Declaration
public bool IsDayLightSavingsTime(DateTime inDate)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | inDate |
Returns
| Type | Description |
|---|---|
| bool |
ToString(string)
Declaration
public string ToString(string prefix)
Parameters
| Type | Name | Description |
|---|---|---|
| string | prefix |
Returns
| Type | Description |
|---|---|
| string |
getiCalDaylightSavingTimePattern(DateTime)
Declaration
public string getiCalDaylightSavingTimePattern(DateTime date)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | date |
Returns
| Type | Description |
|---|---|
| string |