mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
[core:time/timezone] Nanoseconds Not Preserved on Calls to timezone.datetime_to_tz
This commit is contained in:
@@ -224,7 +224,7 @@ datetime_to_tz :: proc(dt: datetime.DateTime, tz: ^datetime.TZ_Region) -> (out:
|
|||||||
record := region_get_nearest(tz, tm) or_return
|
record := region_get_nearest(tz, tm) or_return
|
||||||
|
|
||||||
secs := time.time_to_unix(tm)
|
secs := time.time_to_unix(tm)
|
||||||
adj_time := time.unix(secs + record.utc_offset, 0)
|
adj_time := time.unix(secs + record.utc_offset, i64(dt.nano))
|
||||||
adj_dt := time.time_to_datetime(adj_time) or_return
|
adj_dt := time.time_to_datetime(adj_time) or_return
|
||||||
adj_dt.tz = tz
|
adj_dt.tz = tz
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user