[Tickets #13947] Re: Calendar breaks on DST start date
noreply at bugs.horde.org
noreply at bugs.horde.org
Mon Apr 13 14:11:02 UTC 2015
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: https://bugs.horde.org/ticket/13947
------------------------------------------------------------------------------
Ticket | 13947
Updated By | jsveiga at it.eng.br
Summary | Calendar breaks on DST start date
Queue | Kronolith
Version | 4.2.2
Type | Bug
State | Not A Bug
Priority | 2. Medium
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
jsveiga at it.eng.br (2015-04-13 14:11) wrote:
Sorry, I failed to note that the (windows) client timezone should be
set to a DST timezone (in my case, (UTC-3:00) Brasilia), and I'm using
Firefox 37.0.1.
The calendar uses javascript functions from the browser, but the
building of the calendar view is coming from Kronolith (for example
kronolith.js, updateView for the large calendar view).
So it seems in some js implementations, date arithmetic works
differently (one can argue if "different" is wrong or more strict),
but Kronolith should be aware of that and deal with it.
For example, for the large month view, simply doing this:
#############
--- kronolith.js.orig 2015-04-13 10:56:33.267068678 -0300
+++ kronolith.js 2015-04-13 11:03:01.578750995 -0300
@@ -514,6 +514,7 @@
var tbody = $('kronolith-month-body'),
dates = this.viewDates(date, view),
day = dates[0].clone();
+ day.setHours(15);
$('kronolithCurrent')
.update(this.setViewTitle(date, view, data));
#################
on the updateView function where it builds the month table, solves the
issue by moving the time away from 00:00, avoiding that adding
days/weeks to Date results in an unexpected day due to the DST switch
point.
Similar workarounds can be done for the other instances where DST is
causing problems.
More information about the bugs
mailing list