All Day Events Google Calendar Sync

7 views
Skip to first unread message

Jan Vielfalter

unread,
4:34 AM (15 hours ago) 4:34 AM
to Easy!Appointments - Support Group
Hello, 

a Client using EA contacted me today and complained, that all day appointments were not synching correctly from Google Calendar. I put some code from the google.php into Gemini and it identified the following Problems: Cause of the problem: The Google API provides a `dateTime` field (with time) for regular appointments, but only a `date` field (without time) for all-day appointments. The previous logic in Easy!Appointments only checked the `dateTime` field. Skipping appointments: If both the `start` and `end` fields for the time were zero (which is the case for all-day appointments), the system considered the appointment invalid or empty and simply skipped it. Incorrect timestamps: Even if the appointment wasn't skipped, the zero value caused the system to use the current time for both the start and end times, resulting in erroneous entries. Typo in the code: Additionally, there was a minor bug (typo) where, in the case of all-day appointments, the end date was incorrectly used as the start date. Changes Made I have modified the file application/controllers/Google.php : The system now correctly checks whether a dateTime or a date exists. All-day appointments are now correctly entered as "unavailable" in Easy!Appointments, covering the entire day. The typo in the synchronization of existing appointments has been corrected. Is this a known Issue?
Reply all
Reply to author
Forward
0 new messages