Skip to content

Conversation

@jpottier
Copy link
Contributor

Use DateTime object comparison to avoid Timezone issue

$this->contains($event->getBegin()) ||
($event->getEnd() && $this->contains($event->getEnd()) && $event->getEnd()->format('c') !== $this->begin->format('c'))
;
return $event->getBegin() < $this->getEnd() && $event->getEnd() > $this->getBegin();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any unit test about this expected behavior is same as actual?

I think it needs some tests to present that this can fix the timezone issue :).

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

Successfully merging this pull request may close these issues.

2 participants