6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
7/29/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#12843] Wrong timezone calculation with CalDAV
*
Your Email Address
*
Spam protection
Enter the letters below:
.___..__ .__.\ /.__ | [ __[__] >< [__) | [_./| |/ \|
Comment
> I've installed 5.1.6-git and tried to dig deeper into that problem. > Here is what I got: > > I'm importing the attached ics. That's the way lighning sends its data. > The main data is: > DTSTART;TZID=Europe/Berlin:20140205T100000 > DTEND;TZID=Europe/Berlin:20140205T110000 > > So here what happends in the code > In framework/Icalendar/lib/Horde/Icalendar.php line 1296 > $time = $this->_parseTime($dateParts[1]) > is called > it gets $dateParts[1] what has the correct value of 100000 > and it returns: > $time Array [4] > hour 10 > minute 00 > second 00 > zone Local > > In the next lines $this->_parseTZID($date, $time, $tzid) is called > that returns > $tzoffset 3600 > > That offset is substracted from the calculated time, what gives us > the correct time in UTC > > But when we came back to line 681 In > framework/Icalendar/lib/Horde/Icalendar.php and set the attribute with > $this->setAttribute($tag, $this->_parseDateTime($ts[0], $tzid), $params); > > We end up with an Object that looks like: > > $this Horde_Icalendar_Vevent > CLASSNAME Horde_Icalendar_Vevent > type vEvent > _container Horde_Icalendar > _attributes Array [7] > 0 Array [4] > 1 Array [4] > 2 Array [4] > 3 Array [4] > 4 Array [4] > 5 Array [4] > name DTSTART > params Array [1] > TZID Europe/Berlin > value 1391590800 > values Array [1] > 6 Array [4] > _components Array [0] > _newline > _version 2.0 > _oldFormat false > > So we have the time in UTC but TZID set to Europe/Berlin > That object get passed back the whole way to kronolith/data.php line 90 > $next_step = $data->nextStep($actionID, $param); > > So in the database I end up with and event that looks like: > event_start 2014-02-05 08:00:00 > event_end 2014-02-05 08:59:59 > event_timezone Europe/Berlin > > It looks like before the event get saved it get coonverted to UTC again > That's with > $conf['calendar']['params']['utc'] = true; > $conf['resource']['params']['utc'] = true; > > If I set both values to false I end up in the database with: > event_start 2014-02-05 09:00:00 > event_end 2014-02-05 09:59:59 > event_timezone Europe/Berlin > > So my quick fix is simple to disable the $tzoffset calculation. and > set it to false. (I know this is not really a fix of the problem) > Without that fix I can just add events correctly from lightning that > are in the same timezone as set in horde under Global Preferences > -> Local and Time > With that fix other timezones also work fine. > > So far for now, will dig deeper. > > > Another problem is that the webinterface of kronolith seems to show > all events according to UTC, no matter what is set in the settings. > But I think that is not related. >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers