Fix datetime comparison in relative datetime functions.

Refs [#2987](https://cakephp.lighthouseapp.com/projects/42648/tickets/2987-caketimeniceshort-not-comparing-to-users-timezone), [#3514](https://cakephp.lighthouseapp.com/projects/42648/tickets/3514-wrong-calculation-of-local-datetime-in-caketime-functions)

Need help writing tests for this. I tried writing tests using the info provided in the tickets but with or without the patch I got the same results :(