zaskem / slackbot-tempestweather

A Slack bot to interact with a Tempest weather station, bringing local weather data into your favorite Slack channels.
GNU General Public License v3.0
0 stars 0 forks source link

Fix and create logic for handling `-X hour` histories #41

Closed zaskem closed 3 years ago

zaskem commented 3 years ago

Super niche issue/bug. Negative hour histories behave erratically and default to the 'day' view/summary of the range in which the value falls. E.g., /weather -36 hour will likely summarize the equivalent /weather -2 day argument.

Secondly, the last argument doesn't actively support an hour complement (requesthandler/index.php:86) and therefore doesn't match any $natureOfrequest supported by the bot.

This behavior makes sense given how the logic in/around requesthandler/index.php:75-96 determine the calculations, but doesn't match the original design and current documentation for histories.