mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-04 12:07:45 +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
|
||||
|
||||
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.tz = tz
|
||||
|
||||
|
||||
Reference in New Issue
Block a user