cancel
Showing results for 
Search instead for 
Did you mean: 

Chart Refresh and Requery of Tag History Query

Former Member
0 Kudos

I am querying a server in Japan that initially brings back the correct data with the correct timestamps. After 60 seconds (chart update) the tag query does not retain the Japan time zone offset, instead it takes the time of the local machine. How can I get the query to retain and use the offset time (written in JavaScript as part of the webpage) when requerying the data in a tag history query every time it refreshes?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Kyle,

Are you saying you are querying a tag server in Japan from an xMII server (presumably in the US)?

You should probably have an xMII server in Japan as well. Then, you could create a virtual server connection from the US xMII server to the Japan xMII server and take advantage of the timezone offset parameter in the virtual server on the US xMII server.

What exactly are you doing via Javascript on the page concerning the start date and end date of the query?

Former Member
0 Kudos

Yes we do have the virtual connections setup between xMII servers here in the US and Japan. The Japan server reads the data and sends it back to us here in the US where the server is where we have stored all of the queries, display templates etc. In JavaScript we determine the local machine time offset to GMT and then subtract the server offset to GMT which initially pulls back the correct data and timestamp until it refreshes. Then it seems to loose the intelligence of the offset we used in the previous or initial execution. We need to be able to setup the offset so that anyone in any time zone can get the correct data and timestamp.

jcgood25
Active Contributor
0 Kudos

Kyle,

The iChart will automatically adjust the times to the last 'n seconds' of the data if the TZOffset parameter is set for the data server if no dates are set in the underlying query template (default would be the last 60 minutes of trend data). Once the US based times are adjusted to the most recent time for the data in Japan you will essentially have the effect of the user bumping the chart forward to the 'now' time in Japan without having to know the time zone offset differences.

If you use the VCR control buttons in the tool bar then it really shouldn't matter since from that point forward the dates are passed through the virtual connection to the tag data server connection.

If you are using javascript to set new dates and the forcing the iChart to update make sure you use document.APPLET.updateChart(true); instead of document.APPLET.refresh();

Best Regards,

Jeremy Good