Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -63,8 +63,7 @@ export async function get_weather_forecast(date) { | ... | @@ -63,8 +63,7 @@ export async function get_weather_forecast(date) { |
63 | } | 63 | } |
64 | 64 | ||
65 | function extract_from(date, json_response) { | 65 | function extract_from(date, json_response) { |
66 | - const time_zone = date.getTimezonOffset() * 60 * 1000 | 66 | + const target_timestamp = Math.floor(date.getTime() / 1000) |
67 | - const target_timestamp = Math.floor(date.getTime() / 1000) + time_zone | ||
68 | 67 | ||
69 | const target_index = find_min_index(json_response.daily.map(it => Math.abs(it.dt - target_timestamp))) | 68 | const target_index = find_min_index(json_response.daily.map(it => Math.abs(it.dt - target_timestamp))) |
70 | 69 | ... | ... |
-
Please register or login to post a comment