Tips
The Perils of Date Comparison in Software
If you’ve never developed software that deals with dates and time periods, you may assume it’s simple enough. However, the only thing that is simple is making a mistake. For example, in PHP, if you run the method DateTimeInterface::setTimezone, it will perform a timezone conversion from the default timezone. That’s why it’s important to set the timezone in the second argument of the constructor DateTimeInterface::__construct, since in PHP there are so many ways to set the default timezone.