Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신원형
/
study-or-enjoy
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
신원형
2022-05-27 03:34:08 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e9504433835d58f271dbe21aba1b483385353e74
e9504433
1 parent
2f56da04
removed utc time offset
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
weather.js
weather.js
View file @
e950443
...
...
@@ -63,8 +63,7 @@ export async function get_weather_forecast(date) {
}
function
extract_from
(
date
,
json_response
)
{
const
time_zone
=
date
.
getTimezonOffset
()
*
60
*
1000
const
target_timestamp
=
Math
.
floor
(
date
.
getTime
()
/
1000
)
+
time_zone
const
target_timestamp
=
Math
.
floor
(
date
.
getTime
()
/
1000
)
const
target_index
=
find_min_index
(
json_response
.
daily
.
map
(
it
=>
Math
.
abs
(
it
.
dt
-
target_timestamp
)))
...
...
Please
register
or
login
to post a comment