BrewPi / brewpi-www

This is the repository for the BrewPi web interface. The web interface will communicate with the Python script, which will in turn talk to the BrewPi Spark
https://www.brewpi.com
106 stars 75 forks source link

Beer Profile Graph showing wrong value if viewing from different time zone #64

Open tgfish opened 8 years ago

tgfish commented 8 years ago

When viewing my BrewPi page from a time zone other than the time zone of the physically located BrewPi the Beer Profile graph shows the incorrect temperature value.

For example: My BrewPi is located in EDT while I am viewing my BrewPi page from CDT (1 hour behind). The Beer Profile graph shows 58.79 degrees F as the current profile value while the Current Beer Profile value (in the upper left "LCD") shows 57.6 degrees F. The 58.79 degrees F value shown in the Beer Profile graph is the correct value but for 1 hour prior.

I believe the issue stems from this line in the master branch: https://github.com/BrewPi/brewpi-www/blob/master/js/control-panel.js#L238

and this line in the legacy branch: https://github.com/BrewPi/brewpi-www/blob/master/js/control-panel.js#L238

Although I'm sorry I have no expertise in how to fix it.

tgfish commented 8 years ago

Additionally, it looks like the Beer Profile values are stored without a time zone, this will cause issues if the Beer Profile is adjusted on a machine with a different time zone then the time zone of the BrewPi.