Skip to content

Calendar.GetTimeZone

Overview

string Calendar.GetTimeZone ( value )
Returns timezone information of the specified target date time.

Arguments

DateTimeOffset value Value to extract time zone information

Remarks

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

Examples

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

$Xml.SetValue('Result', $Calendar.GetTimeZone($Xml.EvaluateDateTime('ChangedDate')));

Result is

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

See Also