mtdowling/cron-expression — pull request #48 by holtkamp (2014-04-15 17:50:40+00:00)
Title: Patch different timezone support

When providing a DateTime object to isDue(), the TimeZone information is not respected / lost when it is formatted to a TimeZone agnostic timestamp at:
https://github.com/mtdowling/cron-expression/blob/v1.0.3/src/Cron/CronExpression.php#L243

We found out about this when processing incoming API requests (that are always in UTC) in a timezone different than UTC. The CRON checking mechanism 'converted' them to DateTimes in the local TimeZone however, resulting in unexpected behavior.

I think the preferred behavior would be to convert incoming DateTime objects to the local DateTimeZone first as described here: http://simonholywell.com/post/2013/12/convert-utc-to-local-time.html

Maybe the tests deserve some more attention.