Class PolarTimeZone
- Namespace
- PolarStudio
- Assembly
- PolarStudio.dll
This class is a wrapper for a timezone.
public class PolarTimeZone
- Inheritance
-
PolarTimeZone
- Inherited Members
- Extension Methods
Properties
Caption
Returns the caption (display name)
public string Caption { get; }
Property Value
DaylightName
Returns the name for the daylight saving time period.
public string DaylightName { get; }
Property Value
Name
Returns the name.
public string Name { get; }
Property Value
Obsolete
Returns True if not used anymore.
public bool Obsolete { get; }
Property Value
StandardName
Returns the name for the 'standard' (not-daylight saving time) period.
public string StandardName { get; }
Property Value
TimeZone
The underlying TimeZoneInfo object.
public TimeZoneInfo TimeZone { get; }
Property Value
Methods
LocalDateTimeToUTCdateTime(DateTime, bool)
Converts a local date/time value in this timezone to an UTC date/time value.
public DateTime LocalDateTimeToUTCdateTime(DateTime pLocalDateTime, bool pTwilightZoneDST = false)
Parameters
pLocalDateTime
DateTimeThe local date/time
pTwilightZoneDST
boolPass as True if in the 'twilight zone'. When the time switches from 'normal' to DST at 03:00, the clock is set back to 02:00. All times then (say 02:25) happen that night for the second time. This hour we call the 'twilight zone'. These date/time can be marked specifically to let the user know it is the second occurance of that time that night.
Returns
- DateTime
The date/time in UTC.
UTCdateTimeToLocalDateTime(DateTime)
Converts an UTC date/time to a local date
public DateTime UTCdateTimeToLocalDateTime(DateTime pUTCdateTime)
Parameters
pUTCdateTime
DateTimeThe UTC date/time to convert.
Returns
- DateTime
A date time in this time zone.
UTCdateTimeToLocalDateTime(DateTime, ref bool, ref string)
Converts an UTC date/time to a local date
public DateTime UTCdateTimeToLocalDateTime(DateTime pUTCdateTime, ref bool pTwilightZoneDST, ref string pActualTimeZoneName)
Parameters
pUTCdateTime
DateTimeThe UTC date/time to convert.
pTwilightZoneDST
boolThis by-ref boolean parameter is set to True if the time takes place in the twilight zone.
pActualTimeZoneName
stringThis by-ref parameter returns the actual timezone name of the local date/time
Returns
- DateTime
A date time in this time zone.