time: add test for #3291

pull/3293/head
sh0f 2020-01-01 15:00:23 +08:00 committed by Alexander Medvednikov
parent a99f214a0f
commit 3c17851200
1 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,14 @@ fn test_unix() {
assert t5.hour == 5
assert t5.minute == 6
assert t5.second == 7
t6 := time.unix(1577858969)
assert t6.year == 2020
assert t6.month == 1
assert t6.day == 1
assert t6.hour == 6
assert t6.minute == 9
assert t6.second == 29
}
fn test_unix2() {