Daylight Savings Time bug with history

  • 2
  • Problem
  • Updated 2 months ago
  • (Edited)

I’m seeing a problem apparently related to the transition from standard
time to daylight savings time.  I use the following URL to access the history API:

https://api.weather.com/v2/pws/history/all?date=20190309&units=e&stationId=KWARENTO135&apiKey=xxx&format=json

In the returned results, the observation times range between these values:

Epoch / Local time value

1552201463 / Saturday, March 9, 2019 11:04:23 PM GMT-08:00

1552287563 / Sunday, March 10, 2019 11:59:23 PM GMT-07:00

 So I asked for history for March 9, but got observations for only the last hour of that day and for the entire next day.



Photo of Dan Tripp

Dan Tripp

  • 5 Posts
  • 0 Reply Likes

Posted 2 months ago

  • 2
Photo of Victoria Gardner

Victoria Gardner, Official Rep

  • 566 Posts
  • 81 Reply Likes
Yes, there was a glitch with the time change across all parts of the API.  Now I guess the only place you'd see it is history.

--Victoria
Photo of Evan R

Evan R

  • 2 Posts
  • 0 Reply Likes
I am seeing this too. The daily summary output for the history API call - v2/pws/history/daily - is also bugged. For March 9, I got two summary observations one dated "2019-03-10 23:58:06" local time and the other dated "2019-03-10 01:58:22" local time. For March 10, the two summary observations were dated "2019-03-10 01:58:22" and "2019-03-11 02:14:20" local times. I don't know whether either of the observations from each actually report the appropriate highs, lows, and averages for the calendar day.

Victoria, are you saying that the only place to see the data will be in the history section of the PWS web page at wunderground.com? Are you also saying that there is no effort being made to correct these known incorrect reports?







Photo of Victoria Gardner

Victoria Gardner, Official Rep

  • 566 Posts
  • 81 Reply Likes
I am only saying that it has been reported to the people it needs to be reported to.  Correcting all known PWS data around the world would be a Herculean task.  I have not asked if that will occur.  If I were programming something with this data, I would build in the correction in my own code.

All I meant is that the time shift is not a daily event that one needs to address. 

--Victoria
Photo of Evan R

Evan R

  • 2 Posts
  • 0 Reply Likes
The problem is not correcting the data for the time change. The problem is the API is reporting the wrong data. When you request all observations from March 9 (which isn't even the date that the time change occurred), the API responds with 1 hour of data from March 9 and all the data from March 10. So in the end, there are 23 hours worth of data that I cannot get through the API.

https://api.weather.com/v2/pws/history/all?stationId=KSCMURRE111&format=json&units=e&date=20190309&apiKey=...



Photo of Victoria Gardner

Victoria Gardner, Official Rep

  • 566 Posts
  • 81 Reply Likes
Okay!  Let me find out more from the back end of things...

--Victoria