BreezeChMS / breeze-api-v1

The Breeze API v1 allows you to build custom applications integrated with the Breeze database.
https://www.breezechms.com/api
5 stars 3 forks source link

Specifying `all_day=1` when adding events produces incorrect dates #4

Open epixian opened 4 years ago

epixian commented 4 years ago

DISCLAIMER: Breeze does not actively monitor the contents of posted messages, is not responsible for any messages posted, does not vouch for or warrant the accuracy, completeness or usefulness of any message, and is not responsible for the contents of any message.

Without all_day=1: https://yoursubdomain.breezechms.com/api/events/add?name=Bonfire&starts_on=1467161100

{"id":"120778568","oid":"81268","event_id":"1757296","name":"Bonfire","category_id":"0","start_datetime":"2016-06-28 20:45:00","end_datetime":"2016-06-28
21:45:00","created_on":"2020-05-16 11:44:48"}

With all_day=1: https://yoursubdomain.breezechms.com/api/events/add?name=Bonfire&starts_on=1467161100&all_day=1

{"id":"120778570","oid":"81268","event_id":"1757298","name":"Bonfire","category_id":"0","start_datetime":"1969-12-31 19:00:00","end_datetime":"2020-05-16
23:55:00","created_on":"2020-05-16 11:47:28"}
christianpatrick commented 4 years ago

@epixian, I've noticed the same thing with all day start_datetime being off. Personally, the workaround I use is calculate the 00:00:00 of the event date with EST timezone and they will count it as an all day event. For the end_datetime, 11:55pm is the time used to calculate an all-day event according to the events I've created inside of the platform. I hope this works for you as it has for me!