En el controlador, escribimos:
use Cake\I18n\Time; public function correctTransaction() { setlocale(LC_TIME, 'es_VE', 'es_VE.utf-8', 'es_VE.utf8'); date_default_timezone_set('America/Caracas'); $initialDate = new Time(); debug($initialDate); $initialDate ->year(2018) ->month(8) ->day(31) ->hour(0) ->minute(0) ->second(0); debug($initialDate); }