Codeunit 8720 Time Zone

System Application, System.DateTime

Source AL, 80 lines

src/System Application/App/Date and Time/src/TimeZone.Codeunit.allines 11 to 26 of 80, Copyright (c) Microsoft Corporation. MIT

codeunit 8720 "Time Zone"{    InherentEntitlements = X;    InherentPermissions = X;    /// <summary>    /// Retrieves the offset from the requested time zone at the time of the requested datetime. This takes into account any daylight saving time conditions that may apply.    /// </summary>    /// <param name="SourceDateTime">The datetime that will be used as the basis for the difference calculation.</param>    /// <param name="TimeZoneId">The ID of the time zone that you want to calculate the offset for.</param>    /// <returns>A duration that indicates the offset between UTC and the requested time zone for the provided datetime.</returns>    procedure GetTimezoneOffset(SourceDateTime: DateTime; TimeZoneId: Text): Duration    var        TimeZoneImpl: Codeunit "Time Zone Impl.";    begin        exit(TimeZoneImpl.GetUtcOffset(SourceDateTime, TimeZoneId));

All 80 lines

Public procedures 5 in 29

GetTimezoneOffset(SourceDateTime: DateTime; TimeZoneId: Text): Durationnew in 22
GetTimezoneOffset(SourceDateTime: DateTime): Durationnew in 22
GetTimezoneOffset(SourceDateTime: DateTime; SourceTimeZoneId: Text; DestinationTimeZoneId: Text): Durationnew in 22
TimeZoneSupportsDaylightSavingTime(TimeZoneId: Text): Booleannew in 22
IsDaylightSavingTime(DateTimeToCheck: DateTime; TimeZoneId: Text): Booleannew in 22