pub const Timetype = struct offset: i32flags: u8name_data: [6:0]u8pub fn name(self: *const Timetype) [: 0]const u8pub fn isDst(self: Timetype) boolpub fn standardTimeIndicator(self: Timetype) boolpub fn utIndicator(self: Timetype) bool15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35pub const Timetype = struct {
offset: i32,
flags: u8,
name_data: [6:0]u8,
pub fn name(self: *const Timetype) [:0]const u8 {
return std.mem.sliceTo(self.name_data[0..], 0);
}
pub fn isDst(self: Timetype) bool {
return (self.flags & 0x01) > 0;
}
pub fn standardTimeIndicator(self: Timetype) bool {
return (self.flags & 0x02) > 0;
}
pub fn utIndicator(self: Timetype) bool {
return (self.flags & 0x04) > 0;
}
}