Calendar.GetTimeZone

Overview

Returns timezone information of the specified target date time.

string myCalendar.GetTimeZone(dateTime: DateTimeOffset)

Arguments

DateTimeOffset dateTime

Value to extract time zone information

Remarks

Return value is "hh:mm" time span format.

Example

Results

var currentDate = $Calendar.Today; $Xml.SetValue('CurrentDate', currentDate); $Xml.SetValue('ChangedDate', $Calendar.ChangeTimeZone(currentDate, '02:00')); $Xml.SetValue('Result', $Calendar.GetTimeZone($Xml.EvaluateDateTime('ChangedDate')));

Example

<CurrentDate>2017-01-25T15:47:56.4198506Z</CurrentDate> <ChangedDate>2017-01-25T17:47:56.4198506+02:00</ChangedDate> <Result>2:0</Result>

See Also

Copyright © 2010 - 2023 Emakin. All rights reserved.