Andrew,

We can't use this as a workaround, but what you're suggesting is essentially 
what WU should be doing with the date that we provide in the query URL.
WU should be doing the conversion to station localtime and returning the values 
for that date, relative to the station.
But they seem to be returning the values for the date relative to UTC instead.

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)

> On May 31, 2019, at 1:14 AM, Andrew Milner <andrew.s.r.mil...@gmail.com> 
> wrote:
> 
> ..... so does this just simplify to the fact that in the api the date is 
> taken as being the UTC date?
> ie if one requests data for 20190529, and timezone is +3 you get back data 
> for UTC00:00 29 may to 23:59 29 may 
> which is 03:00 29 may local to 23:59 29 may local AND 00:00 30 may local - 
> 02:59 30 may local
> 
> so to get the data for 29 may local it would be necessary to 
> 1. get data for utc 28 may and discard utc 00:00 - 20:59
> 2. get data for utc 29 may and discard utc 21:00 - 23:59
> 
> or have i not understood correctly?
> 
> 
>> On Friday, 31 May 2019 05:48:09 UTC+3, Rod Yager wrote:
>> 
>> I constructed a cron job which exectued  wunderdates --date=2019-05-30  
>> twice every hour, once 2 minutes before the hour and once 2 minutes after 
>> the hour.
>> 
>> Consistent with my earlier post, between 00:00+10 and 09:59+10 the reply 
>> from the api had data which belonged to 2019-05-31 - the day after the 
>> requested date. Before midnight, and after 10am local time, the reply from 
>> the api had data which belonged to 2019-05-30 (as requested).
>> 
>> I've pasted below some representative samples of the last 3 lines of the 
>> wunderdates output.
>> 
>> Before midnight on May 30: Request is for May 30 data. Replies are May 30 
>> data  Local Date = UTC date.
>> 
>> Thu May 30 20:58:02 2019 UTC+10
>> epoch: 1559213100 date_epoch_local: 2019-05-30 20:45:00 utcepoch: 1559212100 
>> date_epoch_utc: 2019-05-30 10:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T10:45:00Z obsTimeLocal: 2019-05-30 20:45:00
>> epoch: 1559213400 date_epoch_local: 2019-05-30 20:50:00 utcepoch: 1559212400 
>> date_epoch_utc: 2019-05-30 10:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T10:50:00Z obsTimeLocal: 2019-05-30 20:50:00
>> Number of WU records:          251
>> 
>> 
>> Thu May 30 22:58:03 2019 UTC+10
>> epoch: 1559220000 date_epoch_local: 2019-05-30 22:40:00 utcepoch: 1559219000 
>> date_epoch_utc: 2019-05-30 12:40:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T12:40:00Z obsTimeLocal: 2019-05-30 22:40:00
>> epoch: 1559220300 date_epoch_local: 2019-05-30 22:45:00 utcepoch: 1559219300 
>> date_epoch_utc: 2019-05-30 12:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T12:45:00Z obsTimeLocal: 2019-05-30 22:45:00
>> epoch: 1559220600 date_epoch_local: 2019-05-30 22:50:00 utcepoch: 1559219600 
>> date_epoch_utc: 2019-05-30 12:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T12:50:00Z obsTimeLocal: 2019-05-30 22:50:00
>> Number of WU records:          275
>> 
>> 
>> Thu May 30 23:58:02 2019 UTC+10
>> epoch: 1559223900 date_epoch_local: 2019-05-30 23:45:00 utcepoch: 1559222900 
>> date_epoch_utc: 2019-05-30 13:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:45:00Z obsTimeLocal: 2019-05-30 23:45:00
>> epoch: 1559224200 date_epoch_local: 2019-05-30 23:50:00 utcepoch: 1559223200 
>> date_epoch_utc: 2019-05-30 13:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:50:00Z obsTimeLocal: 2019-05-30 23:50:00
>> Number of WU records:          287
>> 
>> 
>> 10 hour period after midnight on May 31. Request is for May 30 data. Replies 
>> are May 31 data.  Local Date is 1 day ahead of UTC date
>> 
>> Fri May 31 00:02:02 2019 UTC+10
>> Could not get Weather Underground data.
>> Reason: No JSON object could be decoded
>> Could not get Weather Underground data. Exiting. 
>> 
>> 
>> Fri May 31 00:58:02 2019  UTC+10
>> epoch: 1559227500 date_epoch_local: 2019-05-31 00:45:00 utcepoch: 1559226500 
>> date_epoch_utc: 2019-05-30 14:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T14:45:00Z obsTimeLocal: 2019-05-31 00:45:00
>> epoch: 1559227800 date_epoch_local: 2019-05-31 00:50:00 utcepoch: 1559226800 
>> date_epoch_utc: 2019-05-30 14:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T14:50:00Z obsTimeLocal: 2019-05-31 00:50:00
>> Number of WU records:          11
>> 
>> 
>> Fri May 31 02:58:03 2019 UTC+10
>> epoch: 1559234700 date_epoch_local: 2019-05-31 02:45:00 utcepoch: 1559233700 
>> date_epoch_utc: 2019-05-30 16:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T16:45:00Z obsTimeLocal: 2019-05-31 02:45:00
>> epoch: 1559235000 date_epoch_local: 2019-05-31 02:50:00 utcepoch: 1559234000 
>> date_epoch_utc: 2019-05-30 16:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T16:50:00Z obsTimeLocal: 2019-05-31 02:50:00
>> Number of WU records:          35
>> 
>> 
>> Fri May 31 05:58:02 2019 UTC+10
>> epoch: 1559245500 date_epoch_local: 2019-05-31 05:45:00 utcepoch: 1559244500 
>> date_epoch_utc: 2019-05-30 19:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T19:45:00Z obsTimeLocal: 2019-05-31 05:45:00
>> epoch: 1559245800 date_epoch_local: 2019-05-31 05:50:00 utcepoch: 1559244800 
>> date_epoch_utc: 2019-05-30 19:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T19:50:00Z obsTimeLocal: 2019-05-31 05:50:00
>> Number of WU records:          71
>> 
>> 
>> Fri May 31 08:58:03 2019 UTC+10
>> epoch: 1559256300 date_epoch_local: 2019-05-31 08:45:00 utcepoch: 1559255300 
>> date_epoch_utc: 2019-05-30 22:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T22:45:00Z obsTimeLocal: 2019-05-31 08:45:00
>> epoch: 1559256600 date_epoch_local: 2019-05-31 08:50:00 utcepoch: 1559255600 
>> date_epoch_utc: 2019-05-30 22:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T22:50:00Z obsTimeLocal: 2019-05-31 08:50:00
>> Number of WU records:          107
>> 
>> 
>> Fri May 31 09:58:03 2019 UTC+10
>> epoch: 1559259900 date_epoch_local: 2019-05-31 09:45:00 utcepoch: 1559258900 
>> date_epoch_utc: 2019-05-30 23:45:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T23:45:00Z obsTimeLocal: 2019-05-31 09:45:00
>> epoch: 1559260200 date_epoch_local: 2019-05-31 09:50:00 utcepoch: 1559259200 
>> date_epoch_utc: 2019-05-30 23:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T23:50:00Z obsTimeLocal: 2019-05-31 09:50:00
>> Number of WU records:          119
>> 
>> After 10AM on May 31: Request is for May 30 data. Replies are May 30 data  
>> Local Date = UTC date.
>> 
>> Fri May 31 10:02:02 2019 UTC+10
>> epoch: 1559224200 date_epoch_local: 2019-05-30 23:50:00 utcepoch: 1559223200 
>> date_epoch_utc: 2019-05-30 13:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:50:00Z obsTimeLocal: 2019-05-30 23:50:00
>> epoch: 1559224500 date_epoch_local: 2019-05-30 23:55:00 utcepoch: 1559223500 
>> date_epoch_utc: 2019-05-30 13:55:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:55:00Z obsTimeLocal: 2019-05-30 23:55:00
>> Number of WU records:          288
>> 
>> Fri May 31 11:02:02 2019 UTC+10
>> epoch: 1559224200 date_epoch_local: 2019-05-30 23:50:00 utcepoch: 1559223200 
>> date_epoch_utc: 2019-05-30 13:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:50:00Z obsTimeLocal: 2019-05-30 23:50:00
>> epoch: 1559224500 date_epoch_local: 2019-05-30 23:55:00 utcepoch: 1559223500 
>> date_epoch_utc: 2019-05-30 13:55:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:55:00Z obsTimeLocal: 2019-05-30 23:55:00
>> Number of WU records:          288
>> 
>> Fri May 31 12:02:03 2019 UTC+10
>> epoch: 1559224200 date_epoch_local: 2019-05-30 23:50:00 utcepoch: 1559223200 
>> date_epoch_utc: 2019-05-30 13:50:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:50:00Z obsTimeLocal: 2019-05-30 23:50:00
>> epoch: 1559224500 date_epoch_local: 2019-05-30 23:55:00 utcepoch: 1559223500 
>> date_epoch_utc: 2019-05-30 13:55:00 tz: Australia/Sydney obsTimeUtc: 
>> 2019-05-30T13:55:00Z obsTimeLocal: 2019-05-30 23:55:00
>> Number of WU records:          288
>> 
>> 
>> I think this is enough to describe definitively what happens in UTC+X 
>> timezones.
>> 
>> Rod
>> 
>> 
>> 
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/5a44cbcd-8ddd-4a11-a2d0-4fc8cd4d0663%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/981582C3-B9DD-426C-9DBA-27D5B1593E6E%40isylum.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to