Skip to content

Commit bed3f0f

Browse files
Fix timezone offset for onecall
The onecall API returns the numeric timezone offset in the `timezone_offset` field, with the text offset in the `timezone` field. This is different to the forecast API which returns the numeric offset in the `timezone` field. Refer Bodmer#15
1 parent dd73a89 commit bed3f0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OpenWeather.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ void OW_Weather::fullDataSet(const char *val) {
515515
if (currentParent == "") {
516516
if (currentKey == "lat") lat = value.toFloat();
517517
if (currentKey == "lon") lon = value.toFloat();
518-
if (currentKey == "timezone") timezone = value;
518+
if (currentKey == "timezone_offset") timezone = value;
519519
}
520520

521521
// Current forecast - no array index - short path

0 commit comments

Comments
 (0)