TemporalZ

withTimeZone

Returns a new ZonedDateTime representing the same instant in a new time zone.

See: Temporal.ZonedDateTime.withTimeZone

Parameters

#
self:ZonedDateTime
ZonedDateTime
time_zone:TimeZone
TimeZone

Source

Implementation

#
pub fn withTimeZone(self: ZonedDateTime, time_zone: TimeZone) !ZonedDateTime {
    return wrapZonedDateTime(abi.c.temporal_rs_ZonedDateTime_with_timezone(self._inner, abi.to.toTimeZone(time_zone)));
}