RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / All events have a time which ends at 3.00am
Posted:  19 Dec 2015 10:45   Last Edited By: Roel B.
Ho Roel

Has something gotten broken here please?

http://www.middlemarchesbenefice.org/bucknell.html - service times.

All of the events appear to have both a start time (correct) and an end time of 3am.  All of the calendars are similarly affected.

Hmm - the same problem on this calendar too :

http://www.havensbeaconchurches.org/  sad

Thank you my friend thump_up
__________________
Graham
The Middle Marches Benefice
The villages of Bedstone & Bucknell
Posted:  20 Dec 2015 13:09
Hi Graham,
Oops, I've never seen this before.
I've sent you an email.

Roel
Posted:  21 Dec 2015 17:23
So you did Roel - and what's more you fixed it too.

Thanks again and a Happy Christmas to you and yours.
__________________
Graham
The Middle Marches Benefice
The villages of Bedstone & Bucknell
Posted:  21 Dec 2015 22:10
What was the cause and the fix?

Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  22 Dec 2015 00:04   Last Edited By: Roel B.
Hi Dan and whoever is concerned,

First of all you should know that this problem can only occur in LuxCal versions 3.2.3 or lower; so if you upgraded to LuxCal v4 there is no problem.

Ok, here we go . . .
Blank event end-times (not specified by the user) are set to "99:00" in the database. So the calendar knows that "99:00" means "no time specified"
When retrieving events from the calendar database, the MySQL DATE_FORMAT function was used to get the start and end times from the database formatted as "hh:mm".

Until now, the MySQL DATE_FORMAT function always nicely returned "99:00". However, when I had a detailed look at Graham's calendar database it appeared that the function all of a sudden returned "03:00", rather than "99:00".
Because this problem occurred in the three calendars Graham is managing at the same time, I'm pretty sure what happened is that Grahams ISP upgraded the MySQL software and in this new version the DATE_FOMAT function has changed and doesn't simply pass back the time as is, but reduces it to a valid time, i.e. 99:00 - (4 x 24:00) = 03:00.

This problem can easily be solved by applying the following change to the files "common/retrieve.php" and "common/retrieve2.php":
Change retrieve.php - lines 61 - 62 and retrieve2.php - lines 50 - 51 from . . .

     DATE_FORMAT(e.s_time,'%H:%i') AS sti,
     DATE_FORMAT(e.e_time,'%H:%i') AS eti,

to . . .

     SUBSTR(e.s_time,1,5) AS sti,
     SUBSTR(e.e_time,1,5) AS eti,

Problem solved!
Roel
Posted:  22 Dec 2015 15:27
Thanks for taking the time to explain, Roel.  I was curious...
Posted:  22 Dec 2015 16:34
Thank you for the explanation Roel.

Regards,
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html