[visualization-api] Request for timezone setting functionality

2015-04-09 Thread Julian Blundell
Hi I am logging physical data from sensor boxes located, potentially, all over the world. The data is sent to the graphs as UTC date using the Date(date params) with another column holding the sensor data. Data that is logged at 12 midnight in New York must always be displayed as being

Re: [visualization-api] Request for timezone setting functionality

2015-04-09 Thread 'Daniel LaLiberte' via Google Visualization API
Julian, You will have to use the JavaScript date constructor with Date.UTC() to specify the correct time. See the documentation on: https://developers.google.com/chart/interactive/docs/datesandtimes This won't work if you need to use the JSON representation for your data, however. If you do,

Re: [visualization-api] Request for timezone setting functionality

2015-04-09 Thread 'Daniel LaLiberte' via Google Visualization API
Jules, If you send the data to the browser using a Date format, then you would have to figure out what the browser did with it in order to undo the local time adjustment, so, yes, it would probably be simpler to send the data in some other format, and then convert to dates knowing exactly what

Re: [visualization-api] Request for timezone setting functionality

2015-04-09 Thread Julian Blundell
Hi Daniel Thanks for the pointers. I am getting the data by json and using the Date() format as specified. Originally I was sending up a local time for the sensor, however the routines assume that it is a UTC time and helpfully add on daylight saving time etc. so I reverted to UTC and have

Re: [visualization-api] Request for timezone setting functionality

2015-04-09 Thread Julian Blundell
Thanks Daniel Figured that was the case, shame they do any changes to the date/times, if they just displayed them assuming they were UTC I could get it right on the server end and that would just work. Jules On Thursday, 9 April 2015 15:10:40 UTC+1, Daniel LaLiberte wrote: Jules, If you