Simplify applying offset
This commit is contained in:
parent
fb6f60d4ec
commit
c5356568aa
@ -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;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user