mirror of
https://github.com/vlang/v.git
synced 2025-08-04 02:07:28 -04:00
15 lines
237 B
V
15 lines
237 B
V
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)
|
|
assert info.tm_gmtoff == time.now().unix() - time.utc().unix()
|
|
}
|
|
}
|