mtdowling/cron-expression — pull request #26 by kkirby (2013-04-03 19:20:41+00:00)
Title: Fix for #25

Cleaned up some of the code to use date->modify. The reason for this is because PHP has a bug with adding time and then setting the time. See https://bugs.php.net/bug.php?id=51090. Using modify appears to work around this issue.

The primary problem for #25 was that DST was being observed on the date in question. When the script would subtract 1 hour, it would reset back to the current hour.

The solution was to temporarily set the timezone to UTC when subtracting hours. UTC does not observe DST.

Signed-off-by: Kyle Kirby