I am using a Spline graph with a date+time X axis. The points (with their dates) are fed from a server. The issue that I am experiencing is that times are shown incorrectly.
The server sends the timestamps for the X axis as a String, which is then parsed.
The date variable is then passed to the gwt-highcharts Point object. However in the chart it shows up as either:
18:15:16 (When the client is GMT+2)
17:15:16 (When the client is GMT+3)
So there clearly is a correlation. However I fail to see why the dateTimeFormatter is able to recognize the right date/timezone, but the highcharts graph does not.
I realize the the best way would be to use Date objects from the server, so that the time can be corrected during (de)serialization of GWT rpc. However I am not sure if that would solve the issue in this case, as the dateObj seems to contain the right value. The issue seems to be with displaying that in the timezone of the visitor. Any opinions?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This did the trick indeed! Reading up on the highcharts global options it even sounds somewhat logical that this would be turned on by default - although I cannot explain why people in different timezones did see different results. When turning it off the times are nicely displayed in the correct local timezone.
I also realize that this actually has nothing to do with the GWT wrapper implementation, so I appreciate your help in this matter. Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am using a Spline graph with a date+time X axis. The points (with their dates) are fed from a server. The issue that I am experiencing is that times are shown incorrectly.
The server sends the timestamps for the X axis as a String, which is then parsed.
The date variable is then passed to the gwt-highcharts Point object. However in the chart it shows up as either:
18:15:16 (When the client is GMT+2)
17:15:16 (When the client is GMT+3)
So there clearly is a correlation. However I fail to see why the dateTimeFormatter is able to recognize the right date/timezone, but the highcharts graph does not.
I realize the the best way would be to use Date objects from the server, so that the time can be corrected during (de)serialization of GWT rpc. However I am not sure if that would solve the issue in this case, as the dateObj seems to contain the right value. The issue seems to be with displaying that in the timezone of the visitor. Any opinions?
Thanks!
Not sure if this is the issue you're seeing, but have you tried disabling the UTC logic in Highcharts? E.g.
Make sure you make that call before you render the chart. Let us know if that affects the behavior you're seeing or not...
Hi Shawn, thank you so much.
This did the trick indeed! Reading up on the highcharts global options it even sounds somewhat logical that this would be turned on by default - although I cannot explain why people in different timezones did see different results. When turning it off the times are nicely displayed in the correct local timezone.
I also realize that this actually has nothing to do with the GWT wrapper implementation, so I appreciate your help in this matter. Thanks!