Overview
Returns a new date time of specified date time at the zone offset.
DateTimeOffset Calendar.ChangeTimeZone(dateTime: DateTimeOffset, timeZone: string)
Arguments
Specifies the base date time value.
string timeZone
Specifies the new time zone info for date value in "hh:mm" format.
Example
Result is
Code Block |
---|
|
var currentDate = $Calendar.Today;
$Xml.SetValue('CurrentDate', currentDate);
$Xml.SetValue('ChangedDate', $Calendar.ChangeTimeZone(currentDate, '02:00')); |
Example
Code Block |
---|
|
<CurrentDate>2017-01-25T15:42:47.5389149Z</CurrentDate>
<ChangedDate>2017-01-25T17:42:47.5389149+02:00</ChangedDate> |
Examples
Result is
Code Block |
---|
|
var currentDate = $Calendar.Today;
$Xml.SetValue('CurrentDate', currentDate);
$Xml.SetValue('ChangedDate', $Calendar.ChangeTimeZone(currentDate, '02:00')); |
Code Block |
---|
|
<CurrentDate>2017-01-25T15:42:47.5389149Z</CurrentDate>
<ChangedDate>2017-01-25T17:42:47.5389149+02:00</ChangedDate> |