CakePhp3 – Date Formating and Timezone

23666Quite simply this is a pain to set right, as it seems to default to the american time zone despite several efforts to configure it to european time in both Cakephp3 and the Php.ini file.

But you can display the needed time format as follows in your view action;

Below the field “created” is a date field in a MySQL Database.

Edit;

To set the timezone of your application you need to go to the config/app.php

Change below as follows;

This wont change the default display of dates but will set the dates to be displayed in the locale you desire.

edit;

MORE here