Skip to content

Commit

Permalink
Change onecall to return timezone_offset
Browse files Browse the repository at this point in the history
The onecall API returns the numeric timezone offset in the `timezone_offset` field, unlike the forecast API which returns it in the `offset` field.
Refer Bodmer#15
  • Loading branch information
llamaonaskateboard authored Jan 5, 2024
1 parent dd73a89 commit 3c84e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenWeather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ void OW_Weather::fullDataSet(const char *val) {
if (currentParent == "") {
if (currentKey == "lat") lat = value.toFloat();
if (currentKey == "lon") lon = value.toFloat();
if (currentKey == "timezone") timezone = value;
if (currentKey == "timezone_offset") timezone = value;
}

// Current forecast - no array index - short path
Expand Down

0 comments on commit 3c84e62

Please sign in to comment.