1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

time: fix timezone problems of parse_iso8601 (#7272)

This commit is contained in:
zakuro
2020-12-12 17:19:03 +09:00
committed by GitHub
parent 0aa9f5a007
commit 5fec0d785a
3 changed files with 55 additions and 50 deletions

View File

@@ -91,11 +91,8 @@ pub fn parse_iso8601(s string) ?Time {
second: second
microsecond: mic_second
})
if is_utc {
return t
}
if is_local_time {
return to_local_time(t)
return t // Time already local time
}
mut unix_time := t.unix
mut unix_offset := int(0)