Nick O: Backported a fix for a date time test which failed in different timezones because of a bad comparison