timeZoneId
Returns a time zone identifier representing the system's current time zone.
The caller owns the returned slice and must free it with allocator.
Parameters
- allocator:std.mem.Allocator
- std.mem.Allocator
- io:std.Io
- std.Io
Source
Implementation
pub fn timeZoneId(allocator: std.mem.Allocator, io: std.Io) ![]const u8 {
const time_zone = try SystemTimeZone.timeZone(allocator, io);
var write = abi.DiplomatWrite.init(allocator);
defer write.deinit();
abi.c.temporal_rs_TimeZone_identifier(time_zone._inner, &write.inner);
return try write.toOwnedSlice();
}