Simplify applying offset

This commit is contained in:
Nathan Fisher 2023-06-13 01:40:56 -04:00
parent fb6f60d4ec
commit c5356568aa
1 changed files with 1 additions and 4 deletions

View File

@ -280,10 +280,7 @@ pub const DateTime = struct {
if (self.second) |s| {
seconds += s;
}
switch (self.tz) {
.utc => {},
.offset => |ofs| seconds -= ofs.asSeconds(),
}
if (self.getOffset()) |ofs| seconds -= ofs.asSeconds();
return seconds;
}
};