niyaz18 / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

timezone support in master seems broken #713

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For me the timezone support in ca050b26c23672c6a1ca34f2dfc49557f9e6ea6c seems 
to be broken. I want to plot a line graph for a data series which a time axis 
of length about fifteen minutes and select a timezone GMT-0100. The effect is, 
that no ticks are generated, because the tick generator is unable to handle the 
timezone offsets.

I need to apply 0002-Fix-usage-of-timezone-js-and-check-of-upper-axis-bou.patch 
to flot to make it work. Additionally I need to apply 0001-Magic-fix.patch to 
timezone-js (which is a rather strange patch, but it Works For Me(tm)).

With both patches applied everything works fine for me and only with both 
patches applied.

Original issue reported on code.google.com by m.oe...@xceptance.net on 5 Jul 2012 at 3:26

Attachments:

GoogleCodeExporter commented 8 years ago
I reported the patch for timezone-js at 
https://github.com/mde/timezone-js/issues/30 .

Original comment by m.oe...@xceptance.net on 6 Jul 2012 at 7:19

GoogleCodeExporter commented 8 years ago
I cannot reproduce this.  timezone-js has since been updated and patch 0001 no 
longer applies.  If you have specific code that reproduces this issue, please 
share.

Original comment by mrcote on 2 Dec 2012 at 5:57

GoogleCodeExporter commented 8 years ago
I didn't write the original timezone patch, but from what I can tell, all tick 
generation is done in UTC. You actually end up with the same ticks regardless 
of what timezone you specify, and, actually, the same if you specify "browser" 
or don't use the option at all. So time zone offsets shouldn't come into the 
generation at all. In fact, it seems that you can actually just use the vanilla 
Date object in the tickGenerator, even if timezone-js is present; the type of 
date object only matters for the tickFormatter. Regardless I suppose it is 
better practice to use the same object for both.

I think perhaps that timezone-js was temporarily changed to make UTC *not* the 
default. At the moment, though, it seems fine. Please reopen if you can 
reproduce and provide a simple example if possible.

Closing this as "invalid" because, while it may well have been broken in the 
past, it would have been timezone-js's fault, since it worked at one point.

Original comment by mrcote on 3 Dec 2012 at 4:26