6.0.0-beta1
7/22/25

[#5235] Internal kolab time encoding
Summary Internal kolab time encoding
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners wrobel (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 04/10/2007 (6678 days ago)
Due
Updated 05/08/2007 (6650 days ago)
Assigned 05/08/2007 (6650 days ago)
Resolved 05/08/2007 (6650 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/08/2007 01:02:46 PM Gunnar Wrobel State ⇒ Not A Bug
 
05/08/2007 01:02:13 PM Gunnar Wrobel Comment #11 Reply to this comment
I checked the way Bug 1822 was handled but I'm pretty confident that 
the fix applied there was indeed correct.



Kronolith uses the local timezone internally. And Kolab wishes to have 
all day events remembered by their date only (no additional time 
information). For an all day event that would occur today Kronolith 
sets the start date to 0:00 08/05/2007 (local time). If the Kolab 
driver would now use gmstrftime to generate a date string from this 
timepoint, this would result in 2007-05-07 since 0:00 08/05/2007 local 
time is 10:00 07/05/2007 GMT. I tested that whole day events are 
actually misplaced a day to early if I apply the patch.
05/08/2007 08:50:52 AM Gunnar Wrobel Comment #10
New Attachment: Kolab-en-de-code-date.patch Download
State ⇒ Assigned
Reply to this comment
Basically this refers back to the problem of All-Day-Events. The 
change from gmstrftime() to strftime() has been discussed in Bug 1822 
and was applied to CVS a while ago 
(http://cvs.horde.org/diff.php?r1=1.34&r2=1.35&f=framework%2FKolab%2FKolab.php). I'll have to investigate if this was an incorrect 
solution.




05/08/2007 07:09:49 AM thomas (dot) jarosch (at) intra2net (dot) com Comment #9 Reply to this comment
Thomas, I'm closing this since this applies to an internal version of
the Kolab module and not to Horde CVS.
IMHO Hore CVS is broken, too.

Please have a look at the " Kolab-XML-time-functions.php" patch for 
the "Kolab.php" file. It fixes the bug in Horde CVS. Just ignore the 
part for Kolab/XML.php.


05/07/2007 09:52:58 PM Gunnar Wrobel Comment #8
State ⇒ Not A Bug
Reply to this comment
Thomas, I'm closing this since this applies to an internal version of 
the Kolab module and not to Horde CVS.



But you are certainly right and the conversion in the internal version 
was flawed. I tried to correct this now and will keep you updated.
04/13/2007 09:54:06 AM Jan Schneider Comment #7
Assigned to Gunnar Wrobel
State ⇒ Assigned
Reply to this comment
IMHO Kronolith internally uses localtime because only with the
gmmktime / gmstrftime function it behaves correctly.
Correct, it uses the (user's) local time. And it has nothing to do 
with Horde_Date at all, btw.
04/13/2007 09:00:37 AM Gunnar Wrobel Comment #6 Reply to this comment
Please don't commit yet. I've a new patch ready.
No worries, I'm not that quick testing anyhow.
IMHO Kronolith internally uses localtime because only with the
gmmktime / gmstrftime function it behaves correctly.
I might have been wrong about the Horde_Date class. I'll have to take 
a closer look.
04/13/2007 08:33:10 AM thomas (dot) jarosch (at) intra2net (dot) com Comment #5
New Attachment: Kolab-XML-time-functions.php Download
Reply to this comment
Please don't commit yet. I've a new patch ready. The problem was the 
encode function, not the decode functon. Please try the new patch.



I've also updated the new XML.php to use the existing Kolab functions.



IMHO Kronolith internally uses localtime because only with the 
gmmktime / gmstrftime function it behaves correctly.
04/13/2007 08:26:33 AM Gunnar Wrobel Comment #4 Reply to this comment
Hello,

I think the internal time encoding of the current Kolab code is
wrong. The dates stored in the XML source are UTC. The current
kronolith driver directly takes the output from
Kolab::decodeDateOrDateTime() which is produced by gmmktime.
Yes, this is certainly wrong. I checked if this function has ever been 
modified but it has been checked in like that:



http://cvs.horde.org/co.php?r=1.16&f=framework%2FKolab%2FKolab.php
You won't notice the bug if you only use kronolith, but when you use
it together with kontact, the events start at the wrong time.

@Gunnar: Please check the patch with a real Kolab server without the
caching framework.
Will do. If it works fine I'll commit it.
04/13/2007 08:24:41 AM Gunnar Wrobel Comment #3 Reply to this comment
Hmm, I'm still not sure about this one. What's the supposed internal
time format of a Kronolith_Event::start or end field? UTC or
localtime?
Both attributes are defined as Horde_Date and are thus UTC.
04/10/2007 08:12:55 PM thomas (dot) jarosch (at) intra2net (dot) com Comment #2 Reply to this comment
Hmm, I'm still not sure about this one. What's the supposed internal 
time format of a Kronolith_Event::start or end field? UTC or localtime?


04/10/2007 07:38:35 PM thomas (dot) jarosch (at) intra2net (dot) com Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: kolab-fix-time-encoding.patch Download
Queue ⇒ Horde Framework Packages
Summary ⇒ Internal kolab time encoding
Type ⇒ Bug
Reply to this comment
Hello,



I think the internal time encoding of the current Kolab code is wrong. 
The dates stored in the XML source are UTC. The current kronolith 
driver directly takes the output from Kolab::decodeDateOrDateTime() 
which is produced by gmmktime.



You won't notice the bug if you only use kronolith, but when you use 
it together with kontact, the events start at the wrong time.



@Gunnar: Please check the patch with a real Kolab server without the 
caching framework.



Cheers,

Thomas


Saved Queries