Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events cannot be multi-day or end at 2400 hrs #171

Open
ddbruce opened this issue Feb 5, 2024 · 2 comments
Open

Events cannot be multi-day or end at 2400 hrs #171

ddbruce opened this issue Feb 5, 2024 · 2 comments

Comments

@ddbruce
Copy link
Member

ddbruce commented Feb 5, 2024

When creating an event, it cannot end at 2400 hrs, and events cannot be created that span over midnight. When making an event that starts, say, at 1700 hrs and ends at 0000, the event gets added to the database:

image

but does not get added to gcal:

[Sun Feb 04 20:58:07.173069 2024] [php7:error] [pid 12374] [client 172.18.0.2:51226] PHP Fatal error:  Uncaught Google_Service_Exception: {\n "error": {\n  "errors": [\n   {\n    "domain": "calendar",\n    "reason": "timeRangeEmpty",\n    "message": "The specified time range is empty.",\n    "locationType": "parameter",\n    "location": "timeMax"\n   }\n  ],\n  "code": 400,\n  "message": "The specified time range is empty."\n }\n}\n in /var/www/html/vendor/google/apiclient/src/Google/Http/REST.php:118\nStack trace:\n#0 /var/www/html/vendor/google/apiclient/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\\Psr7\\Response), Object(GuzzleHttp\\Psr7\\Request), 'Google_Service_...')\n#1 /var/www/html/vendor/google/apiclient/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\\Client), Object(GuzzleHttp\\Psr7\\Request), 'Google_Service_...')\n#2 /var/www/html/vendor/google/apiclient/src/Google/Http/REST.php(58): Google_Task_Runner->run()\n#3 /var/www/html/vendor/google/apiclient/src/Google/Client.php(830): Google_Http_REST::execute(Object(GuzzleHttp\\Client), Object(GuzzleHttp\\Psr7 in /var/www/html/vendor/google/apiclient/src/Google/Http/REST.php on line 118, referer: https://rpiambulance.com/

It is possible to have a start time after an end time, but the same gcal error occurs when creation.

Ideally this gets fixed by adding a column to the database for end_date and/or just changing start and end to datetimes rather than having date with a start and end time.

@ddbruce
Copy link
Member Author

ddbruce commented Feb 5, 2024

Here's the schema for reference:

image

@ddbruce
Copy link
Member Author

ddbruce commented Feb 5, 2024

hide seems to do nothing on the website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant