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

time: fix repetitive time.now().local().local().local() offsetting the time further and further (#13861)

This commit is contained in:
Vincenzo Palazzo
2022-03-31 23:11:17 +02:00
committed by GitHub
parent 9c1981a309
commit 02c80bd445
5 changed files with 21 additions and 2 deletions

View File

@ -104,6 +104,7 @@ pub fn (t Time) local() Time {
hour: u16(t.hour)
minute: u16(t.minute)
second: u16(t.second)
millisecond: u16(t.microsecond / 1000)
}
st_local := SystemTime{}
C.SystemTimeToTzSpecificLocalTime(voidptr(0), &st_utc, &st_local)