Home > @i2analyze/notebook-sdk > app > IValueFactory > createZonedDateTime
app.IValueFactory.createZonedDateTime() method
Creates a date-time object that has a time zone from a local date-time (or a JavaScript Date
object) and a time zone.
Signature:
createZonedDateTime(dateTime: Date | data.ILocalDateTime, timeZone: data.ITimeZone | data.TimeZoneId, isDst: boolean): data.IZonedDateTime;
Introduced: version 1.1
Parameters
Parameter | Type | Description |
---|---|---|
dateTime | Date | data.ILocalDateTime | A local date-time, or a JavaScript Date . |
timeZone | data.ITimeZone | data.TimeZoneId | A time zone, or a time zone identifier. |
isDst | boolean |
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 timeZone
did not specify a valid time zone.