Skip to content

Commit 6681315

Browse files
committed
add test for RFC3339
1 parent 72cf5a2 commit 6681315

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

utc_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,3 +968,13 @@ func TestUTC_ArithmeticEdgeCases(t *testing.T) {
968968
t.Error("Subtracting same time should return zero duration")
969969
}
970970
}
971+
972+
func TestUTC_RFC3339(t *testing.T) {
973+
ut := Time{time.Date(2024, 1, 2, 15, 4, 5, 0, time.UTC)}
974+
expected := "2024-01-02T15:04:05Z"
975+
976+
result := ut.RFC3339()
977+
if result != expected {
978+
t.Errorf("RFC3339() = %q, want %q", result, expected)
979+
}
980+
}

0 commit comments

Comments
 (0)