I've updated the code to use Cake\Utility\Time.