Author Topic: Feeding MeteoTemplate from weewx?  (Read 11365 times)

0 Members and 1 Guest are viewing this topic.

Offline mwall

  • Contributor
  • ***
  • Posts: 135
Re: Feeding MeteoTemplate from weewx?
« Reply #75 on: January 09, 2017, 06:08:59 PM »
OK, so with regards to the date/time, currently I have 6 parameters in the url for year, month, day, hour, minute and second, Im thinking if I should make an alternative where including a parameter "datetime" would ignore the previous 6 and instead parse the datetime as a whole in the format YYYY-MM-DD HH:MM:SS
Also, I was thinking that by default it would assume the date/time is in the same TZ as the user has their template set, and optionally you could include a parameter "utc=1", if this is detected in the URL it would do the conversion, what do you think

please make it simple for yourself, your users, and those developing clients for this api.

accept only a timestamp that is utc.

there is no need for any other time parameters.

Offline mwall

  • Contributor
  • ***
  • Posts: 135
Re: Feeding MeteoTemplate from weewx?
« Reply #76 on: January 09, 2017, 06:11:30 PM »
just to be even more clear:  that timestamp should be an epoch, i.e., the number of seconds since 01 jan 1970 UTC.

if you use anything else, you will end up with timezone issues and daylight saving issues.

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: Feeding MeteoTemplate from weewx?
« Reply #77 on: January 09, 2017, 06:18:59 PM »
THat would of course be the easiest, but the problem is that from what I have seen, vast majority of SW uses Y, M, D, H, M, S. For example I think WD sends data like this, MB too. I can say this is the highiy prefered way, but still be able to accept the others - I think WU also accepts data as UTC, but as YMD etc. not as a one number timestamp

 

anything