Initial project import

This commit is contained in:
Agila Forge Importer committed 2026-07-13 15:20:32 +00:00
commit 23f2d29e32
11957 files changed
+1754577

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import time
fn test_tm_gmtoff() {
$if windows {
return
} $else {
rawtime := i64(0) // C.time_t{}
C.time(&rawtime) // C.tm{}
info := C.localtime(&rawtime)
t1 := time.now()
t2 := time.utc()
dump(t1)
dump(t2)
dump(t1.nanosecond)
dump(t2.nanosecond)
diff := int(t1.local_unix() - t2.unix())
dump(diff)
dump(info.tm_gmtoff)
assert diff in [info.tm_gmtoff - 1, info.tm_gmtoff, info.tm_gmtoff + 1]
}
}