Home > @i2analyze/i2connect > data > createZonedDateTime
data.createZonedDateTime() function
Creates a date-time object that has a time zone from a local date, a local time, and a time zone identifier.
Signature:
function createZonedDateTime(date: ILocalDate, time: ILocalTime, timeZoneId: TimeZoneId, isDst: boolean): IZonedDateTime;
Introduced: API version 2.0
Parameters
Parameter | Type | Description |
---|---|---|
date | ILocalDate | A local date. |
time | ILocalTime | A local time. |
timeZoneId | TimeZoneId | A time zone identifier. |
isDst | boolean | true if the date-time is in daylight saving time for the specified time zone; false otherwise. This value is especially important for date-time values that are ambiguous, such as during the period when clocks go back from DST to not-DST and the same local time occurs twice. |
Returns:
The new date-time object.
Exceptions
Error
if timeZoneId
did not specify a valid time zone.