Remove nanos field

This commit is contained in:
Nathan Fisher 2023-06-13 01:36:44 -04:00
parent f4c138b2a4
commit fb6f60d4ec
1 changed files with 0 additions and 5 deletions

View File

@ -235,7 +235,6 @@ pub const DateTime = struct {
hour: ?u5,
minute: ?u6,
second: ?u6,
nanos: ?u32,
tz: TimeZone,
const Self = @This();
@ -297,7 +296,6 @@ test "get year" {
.hour = 1,
.minute = 5,
.second = 14,
.nanos = null,
.tz = TimeZone.new(-5, null).?,
};
try testing.expectEqual(dt.getYear(), 2023);
@ -311,7 +309,6 @@ test "get offset" {
.hour = 1,
.minute = 5,
.second = 14,
.nanos = null,
.tz = TimeZone.new(-5, null).?,
};
try testing.expectEqual(dt.getOffset().?, Offset{ .negative = .{ .hours = 5, .minutes = null } });
@ -325,7 +322,6 @@ test "to timestamp utc" {
.hour = 6,
.minute = 21,
.second = 22,
.nanos = null,
.tz = .utc,
};
try testing.expectEqual(dt.toTimestamp(), 1686633682);
@ -339,7 +335,6 @@ test "to timestamp negative offset" {
.hour = 1,
.minute = 21,
.second = 22,
.nanos = null,
.tz = TimeZone.new(-5, null).?,
};
try testing.expectEqual(dt.toTimestamp(), 1686633682);