TemporalZ

offset

Returns the offset used to interpret the internal instant, as a string (±HH:mm).

See: Temporal.ZonedDateTime.offset

Parameters

#
self:ZonedDateTime
ZonedDateTime
allocator:std.mem.Allocator
std.mem.Allocator

Source

Implementation

#
pub fn offset(self: ZonedDateTime, allocator: std.mem.Allocator) ![]u8 {
    var write = abi.DiplomatWrite.init(allocator);
    defer write.deinit();
    const res = abi.c.temporal_rs_ZonedDateTime_offset(self._inner, &write.inner);
    _ = try abi.extractResult(res);
    return try write.toOwnedSlice();
}