The time in the PHP log is incorrect. #305

Closed
opened 2026-04-05 20:26:36 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @andykao1026 on 12/14/2023

CloudPanel version(s) affected

2.4.0

Description

How can I change the time format in PHP logs? I've already modified the timezone settings in the Additional Configuration Directives in the dashboard and also adjusted the timezone settings in /etc/php/8.0/fpm/php.ini. After restarting NGINX and PHP, the time in /home/anenergy/logs/php/error.log is still incorrect.

Incorrect time: [07-Dec-2023 01:24:27 UTC] PHP Warning:
Correct time: [07-Dec-2023 09:24:27 CST] PHP Warning

time-01
time-02
time-03
time-04
time-05
time-06

How to reproduce

How can I change the time format in PHP logs? I've already modified the timezone settings in the Additional Configuration Directives in the dashboard and also adjusted the timezone settings in /etc/php/8.0/fpm/php.ini. After restarting NGINX and PHP, the time in /home/anenergy/logs/php/error.log is still incorrect.

Incorrect time: [07-Dec-2023 01:24:27 UTC] PHP Warning:
Correct time: [07-Dec-2023 09:24:27 CST] PHP Warning

time-01
time-02
time-03
time-04
time-05
time-06

Possible Solution

No response

Additional Context

No response

*Originally created by @andykao1026 on 12/14/2023* ### CloudPanel version(s) affected 2.4.0 ### Description How can I change the time format in PHP logs? I've already modified the timezone settings in the Additional Configuration Directives in the dashboard and also adjusted the timezone settings in /etc/php/8.0/fpm/php.ini. After restarting NGINX and PHP, the time in /home/anenergy/logs/php/error.log is still incorrect. Incorrect time: [07-Dec-2023 01:24:27 UTC] PHP Warning: Correct time: [07-Dec-2023 09:24:27 CST] PHP Warning ![time-01](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/7dd02b00-6435-44aa-9082-d5873f616350) ![time-02](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/770bc9ee-2237-474b-bc6b-c02fee83e5f6) ![time-03](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/f567f6f1-9552-48bb-b5d6-bca1404425a5) ![time-04](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/117534ad-5d9d-49f5-8c7f-41bb6d3637c7) ![time-05](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/0cfdd220-5b49-44ac-8e85-da16804c5e97) ![time-06](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/dda63c1e-29f7-42a6-a33d-adee49c87c62) ### How to reproduce How can I change the time format in PHP logs? I've already modified the timezone settings in the Additional Configuration Directives in the dashboard and also adjusted the timezone settings in /etc/php/8.0/fpm/php.ini. After restarting NGINX and PHP, the time in /home/anenergy/logs/php/error.log is still incorrect. Incorrect time: [07-Dec-2023 01:24:27 UTC] PHP Warning: Correct time: [07-Dec-2023 09:24:27 CST] PHP Warning ![time-01](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/7dd02b00-6435-44aa-9082-d5873f616350) ![time-02](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/770bc9ee-2237-474b-bc6b-c02fee83e5f6) ![time-03](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/f567f6f1-9552-48bb-b5d6-bca1404425a5) ![time-04](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/117534ad-5d9d-49f5-8c7f-41bb6d3637c7) ![time-05](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/0cfdd220-5b49-44ac-8e85-da16804c5e97) ![time-06](https://github.com/cloudpanel-io/cloudpanel-ce/assets/73096328/dda63c1e-29f7-42a6-a33d-adee49c87c62) ### Possible Solution _No response_ ### Additional Context _No response_
Sign in to join this conversation.