I recently downloaded the data (battery voltage and soil moisture) using moteino dashboard "Export all data(CSV)" feature provided by nginx web server. But I got all the data time off by exactly 5 hours. All the data values look okay except the time they are recorded. For instance, I recorded the 4.8V for battery and 33.99% for soil moisture at 4:16 PM but the CSV file is showing they are recorded at 9:16 PM. I doubled check this issue by carrying out the test again another day for more than 24 hours but same result. But the time it is showing in the dashboard graph is correct. Only the downloaded CSV file has this issue. Anyone knows what's going on..Please help..
(Note: I am using Raspberry Pi 3 and the web server is nginx)
Sounds like some GMT time/offset.
Is your server time set correctly (same as your desktop where you view the page)?
Thanks for the info Felix..Could you also guide me how to set the nginx server time? Just want to make sure again that its the nginx server time issue. Like I mentioned earlier, the date/time showing in the graph in the moteino dashboard is accurately correct. Do you still think it's a GMT time offset. By the way, I did try to set the server time by following the link (http://www.oneminuteinfo.com/2013/06/how-to-change-timezone-of-nginx-web-log.html (http://www.oneminuteinfo.com/2013/06/how-to-change-timezone-of-nginx-web-log.html)). But now the CSV data is worse..I mean the timestamps are more weird..
It's your *Pi* system time.
nginx uses the system time.....
sudo date
Thanks Felix but I did check my Pi's (or nginx server) time. It's correct and never had an issue with it. That's the reason why the graph has always been showing the correct time I guess. The only issue is the data timestamp of the CSV file after I download and open it with MS Excel 2013. Any suggestion what could be the reason that the CSV file is showing 5 hours OFF time..?
Maybe its not compensated for the GMT offset.
Are you running the latest gateway files? Can you actually do a diff to check? There were minor changes to fix some of that CSV export functionality that were not included in an official release yet.
Sorry for late reply..I just updated the gateway files today with the latest ones but no luck. Everything else is good except the 5 hours OFF in CSV data file.
Ok I will try to take a look at this when I work on gateway bugs.