RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / Importing ICS swaps start and end times when event crosses midnight
Posted:  05 Sep 2012 04:53
While importing an ics file tonight, I discovered a problem with LuxCal's handling of events that cross over into the next day.  This was observed using version 2.7.0a.

Specifically, it appears that the import process will swap the start and end times (but not dates) if the end time is less than the start time.  For events that don't cross midnight, this probably makes sense.  But for events that cross over into the next day, it clearly doesn't.

Examples:

Event 1
Start Date/Time 2012-09-08 23:00:00
End Date/Time 2012-09-09 01:00:00

For this event, the actual duration is 2 hours.  When imported, the start becomes 2012-09-08 01:00:00 and the end becomes 2012-09-09 23:00:00.  The 2-hour event has now become a 46-hour event with incorrect start and end times.

Event 2
Start Date/Time 2012-09-08 15:00:00
End Date/Time 2012-09-09 16:00:00

For this event, the actual duration is 25 hours.  When imported, no changes are made due to the end time being greater than the start time.  This event imports correctly.


Please let me know if this isn't clear or more details are needed.

Best regards -
David
Posted:  05 Sep 2012 22:48   Last Edited By: Roel B.
Hi David,
This is very clear. Thanks for reporting this problem. Not many users are using ICS importing, so we don't often get comments on this part of the calendar.
Update:
The problem has been solved and we will include the fix in the next sub-version of LuxCal which we will release in the coming days.

I've sent you an new importICS.php file with the fix.
Roel
Posted:  06 Sep 2012 18:03
Many thanks, Roel!

Works perfectly.  Greatly appreciate your support!

- David