6.0.0-alpha14
7/2/25

[#8220] Add link for all day events doesn't set proper timespan
Summary Add link for all day events doesn't set proper timespan
Queue Kronolith
Queue Version 2.3.1
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester stpierre (at) nebrwesleyan (dot) edu
Created 04/27/2009 (5910 days ago)
Due
Updated 01/13/2010 (5649 days ago)
Assigned
Resolved 04/29/2009 (5908 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
04/29/2009 02:57:58 PM Jan Schneider Comment #3
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
I had to change the code in new.php to take DST into account, but 
otherwise looked good, thanks for the patch!
04/27/2009 03:06:15 PM stpierre (at) nebrwesleyan (dot) edu Comment #1
Priority ⇒ 1. Low
New Attachment: allday-creation.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Add link for all day events doesn't set proper timespan
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
The link to add a new all day event from the "Day" view does not 
properly set the duration of the event.  Instead, the event start time 
is set to 12 am that day, and the end time is set one hour later, to 1 
am.  This is the default for events created at other times, and is an 
appropriate default for non-all-day events, but is obviously not 
appropriate for events intended to be all day events.



I looked into how to solve this, but it seems there are a few issues 
that would have to be resolved:



1.  In new.php, the event end time is, by default, set to one hour 
past the start time, regardless of the value of the 'allday' GET 
variable.  However, changing this behavior is insufficient, because...



2.  In the Kronolith_Event::html() method in Driver.php, if the event 
is not initialized (i.e., $this->isInitialized() returns false), then 
the end time is again set to one hour past the start time, regardless 
of whether or not an end time exists.



I think the proper solution would be two steps:



1.  In new.php, set the end time correctly according to the value of 
the 'allday' GET variable.



2.  In Kronolith_Event::html(), honor the end time if one exists; 
otherwise, default the start time + 1 hour behavior.  In order to 
completely fix this, the behavior must be changed for all of the 
various end time/date attributes Kronolith_Event::html() can render, 
not just end_min.



I have attached a patch that effects these changes.

Saved Queries