TemporalZ

init

Creates a new ZonedDateTime from the given epoch nanoseconds and time zone. Equivalent to the Temporal.ZonedDateTime constructor.

See: Temporal.ZonedDateTime

Parameters

#
epoch_ns:i128
i128
time_zone:TimeZone
TimeZone

Source

Implementation

#
pub fn init(epoch_ns: i128, time_zone: TimeZone) !ZonedDateTime {
    const ns_parts = abi.toI128Nanoseconds(epoch_ns);
    return wrapZonedDateTime(abi.c.temporal_rs_ZonedDateTime_from_epoch_nanoseconds(ns_parts, abi.to.toTimeZone(time_zone)));
}