Remove nanos field
This commit is contained in:
parent
f4c138b2a4
commit
fb6f60d4ec
@ -235,7 +235,6 @@ pub const DateTime = struct {
|
|||||||
hour: ?u5,
|
hour: ?u5,
|
||||||
minute: ?u6,
|
minute: ?u6,
|
||||||
second: ?u6,
|
second: ?u6,
|
||||||
nanos: ?u32,
|
|
||||||
tz: TimeZone,
|
tz: TimeZone,
|
||||||
|
|
||||||
const Self = @This();
|
const Self = @This();
|
||||||
@ -297,7 +296,6 @@ test "get year" {
|
|||||||
.hour = 1,
|
.hour = 1,
|
||||||
.minute = 5,
|
.minute = 5,
|
||||||
.second = 14,
|
.second = 14,
|
||||||
.nanos = null,
|
|
||||||
.tz = TimeZone.new(-5, null).?,
|
.tz = TimeZone.new(-5, null).?,
|
||||||
};
|
};
|
||||||
try testing.expectEqual(dt.getYear(), 2023);
|
try testing.expectEqual(dt.getYear(), 2023);
|
||||||
@ -311,7 +309,6 @@ test "get offset" {
|
|||||||
.hour = 1,
|
.hour = 1,
|
||||||
.minute = 5,
|
.minute = 5,
|
||||||
.second = 14,
|
.second = 14,
|
||||||
.nanos = null,
|
|
||||||
.tz = TimeZone.new(-5, null).?,
|
.tz = TimeZone.new(-5, null).?,
|
||||||
};
|
};
|
||||||
try testing.expectEqual(dt.getOffset().?, Offset{ .negative = .{ .hours = 5, .minutes = null } });
|
try testing.expectEqual(dt.getOffset().?, Offset{ .negative = .{ .hours = 5, .minutes = null } });
|
||||||
@ -325,7 +322,6 @@ test "to timestamp utc" {
|
|||||||
.hour = 6,
|
.hour = 6,
|
||||||
.minute = 21,
|
.minute = 21,
|
||||||
.second = 22,
|
.second = 22,
|
||||||
.nanos = null,
|
|
||||||
.tz = .utc,
|
.tz = .utc,
|
||||||
};
|
};
|
||||||
try testing.expectEqual(dt.toTimestamp(), 1686633682);
|
try testing.expectEqual(dt.toTimestamp(), 1686633682);
|
||||||
@ -339,7 +335,6 @@ test "to timestamp negative offset" {
|
|||||||
.hour = 1,
|
.hour = 1,
|
||||||
.minute = 21,
|
.minute = 21,
|
||||||
.second = 22,
|
.second = 22,
|
||||||
.nanos = null,
|
|
||||||
.tz = TimeZone.new(-5, null).?,
|
.tz = TimeZone.new(-5, null).?,
|
||||||
};
|
};
|
||||||
try testing.expectEqual(dt.toTimestamp(), 1686633682);
|
try testing.expectEqual(dt.toTimestamp(), 1686633682);
|
||||||
|
Loading…
Reference in New Issue
Block a user