Closed koposzek closed 1 year ago
I have the same problem.
$title = 'My event';
$tz = 'Europe/Paris';
$dateStart = '2023-07-25';
$start = new DateTime($dateStart, new DateTimezone($tz));
$days = 1;
$link = Link::createAllDay($title, $start, $days);
The result is correct only in Yahoo: it generates an all-day event on 25 July 2023. It is wrong in Google and Outlook: with $link->google(), $link->webOutlook() and $link->webOffice(), it generates an all-day event on 24 July 2023.
If I try and create an event of more than one day, the result is wrong in ALL calendars. For example:
...
$dateStart = '2023-07-25';
$days = 2;
...
It generates the following results: Google and outlook: 2-day event on 24 & 25 July 2023. Yahoo: 3-day event from 25 to 27 July 2023.
If I use the create
method instead of the createAllDay
method, the problem persists.
@parisiam what is your PHP timezone?
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
@koposzek @parisiam it should be probably fixed by https://github.com/spatie/calendar-links/releases/tag/1.8.6
Context
Describe the Bug
In some Generators (in Google & Outlook exactly) there is a problem with the wrong start date when we want to create an all day event for this specific case:
In the Yahoo generator the allDay parameter seems to be taken into account and it works great, why were these generators made different ? Or did I misunderstood the concept and should transform my date before passing it to Link to some specific format ? I have checked the commit history and before this commit it worked fine.
Expected Behavior
It generates the event start from 14/09/2023 and not 15/09/2023.