raspberrypi / cmprovision

Provisioning system for CM4 products
BSD 3-Clause "New" or "Revised" License
88 stars 11 forks source link

Timezone not respected #34

Closed GFBsoul closed 5 months ago

GFBsoul commented 5 months ago

The timezone of the device running the provisioner is not respected. The provisioning software seems to read the time in UTC and present in the dashboard, rather than the timezone that has been set on the device.

maxnet commented 5 months ago

Keep in mind that cmprovision is a PHP web application, and in the Internet world it is less obvious that the person that is visiting a web page is in the same time zone as the server.

So one typically needs to configure it explicitly. E.g. try setting date.timezone in /etc/php/*/fpm/php.ini sudo systemctl restart php-fpm when done.

GFBsoul commented 5 months ago

Thank you for pointing me in the right direction. The timezone in php.ini does not seem to be respected. However the timezone set in app.php is respected. https://github.com/raspberrypi/cmprovision/blob/f19ceec6065b77957fee0b10d7b655522c069bf7/config/app.php#L70

Format is the same as for the php.ini file. In my case: 'timezone' => 'Europe/Stockholm',

GFBsoul commented 5 months ago

Closing.