josejaner / flot

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

daylight savings time issue #660

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

When I plot the x axis from 11/3/2013 12:00:00AM to 11/4/2013 12:00:00 AM with 
interval of 2 hours, the result is incorrect. I guess this is a bug of the 
plugin.

Could you please take a look at it and fix it if it is a bug?

Thanks a lot!!

Chen

Original issue reported on code.google.com by yua...@hotmail.com on 17 Jan 2012 at 4:28

Attachments:

GoogleCodeExporter commented 8 years ago
I don't see the error, what do you expect it to show if not 12am as the first 
x-axis label?  Can you provide a small example?

Original comment by ryl...@gmail.com on 20 Jan 2012 at 8:39

GoogleCodeExporter commented 8 years ago
The bug is that the interval is 2 hours, but the ticks go from 12pm to 1am, a 
1-hour difference.  This makes perfect sense when you consider that adding 2 
hours to 12am across a DST shift produces a time of 1am, but that's probably 
not the correct behavior for an axis.

Original comment by dnsch...@gmail.com on 8 May 2012 at 7:55

GoogleCodeExporter commented 8 years ago
Hm, if a graph crosses the end of DST, I *would* expect to see 1 am twice when 
using an interval of 1 hour, and, similarly, I would expect 12 am, 1 am, 3 am 
(or 11 pm, 1 am, 2 am) with a 2-hour interval, as displayed above. The fact is 
that 1 am *does* occur twice when DST changes to ST; the difference is that the 
first is 1 am DST, and the second is 1 am ST. In the same vein, I'd expect to 
see 12 am, 1 am, 3 am when ST changes to DST with a 1-hour interval (or 12 am, 
3 am, 5 am/11 pm, 1 am, 4 am with 2-hour intervals).

The only improvement I could think of would be an option to display the ticks 
as something like "1:00 am DST" and "1:00 am ST". Not sure how useful this 
would be, and it might mess up formatting.

However, by default the times should be in UTC, which doesn't use DST, so I'm 
not sure why this is displayed like this at all. Indeed, I can't reproduce 
this--though perhaps the recent timezone patch fixed this.

I *do* see a different bug though, related to DST, but I'll file it separately.

Unless you can suggest a better way to display this, or can explain to me why 
this is wrong as is, I'd like to close this issue as WontFix. 

Original comment by mrcote on 16 Jun 2012 at 1:21