SPTimeZone class
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
It provides timezone information from SharePoint. A conversion from UTC to local time can be calculated by using the following formula.
Remarks
isDaylightSavingsTime = isCurrentDate after DaylightSavingsDate but before the StandardDate
LocalTime = UTCTime - Offset - (isDaylightSavingsTime ? daylightOffset : standardOffset)
June 11, 2 A.M. PST = June 11, 9 A.M. - (480 minutes) - (-60 minutes)
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the SPTimeZone
class.
Properties
daylight |
Gets the date on which daylight time begins for the time zone. |
daylight |
Gets the offset in the number of minutes that daylight time for the time zone differs from Coordinated Universal Time (UTC). |
description | Gets the description for the time zone. |
id | Gets the ID of the time zone. |
offset | Gets the offset in the number of minutes that the time zone differs from Coordinated Universal Time (UTC). |
standard |
Gets the date on which standard time begins for the time zone. |
standard |
Gets the offset in the number of minutes that standard time for the time zone differs from coordinated universal time (UTC). |
Property Details
daylightDate
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the date on which daylight time begins for the time zone.
readonly daylightDate: ISPSystemTime;
Property Value
daylightOffset
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the offset in the number of minutes that daylight time for the time zone differs from Coordinated Universal Time (UTC).
readonly daylightOffset: number;
Property Value
number
description
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the description for the time zone.
readonly description: string;
Property Value
string
id
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the ID of the time zone.
readonly id: number;
Property Value
number
offset
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the offset in the number of minutes that the time zone differs from Coordinated Universal Time (UTC).
readonly offset: number;
Property Value
number
standardDate
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the date on which standard time begins for the time zone.
readonly standardDate: ISPSystemTime;
Property Value
standardOffset
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Gets the offset in the number of minutes that standard time for the time zone differs from coordinated universal time (UTC).
readonly standardOffset: number;
Property Value
number