Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Returns a new date time of specified date time at the zone offset asynchronously.

Promise<DateTimeOffset> myCalendar.ChangeTimeZoneAsync(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

Code Block
languagejs
$Xml.SetValue('CurrentDate', new DateTimeOffset());
$Calendar.ChangeTimeZoneAsync(new DateTimeOffset(), '02:00').then(function(newDate) {
$Xml.SetValue('ChangedDate', newDate);
});

Remarks

Result it

Code Block
languagejs
<CurrentDate>2017-01-25T15:42:47.5389149Z</CurrentDate></p>
<p><ChangedDate>2017-01-25T17:42:47.5389149+02:00</ChangedDate>