canou83

Well-Known Member
Jul 20, 2016
78
7
8
France
cPanel Access Level
Website Owner
Hello, we use Cpanel on a VPS at OVH. The server is based in Graveline in the north of France. We notice deviations of time at the timezone of the server. Indeed, this one is well set on the time of Paris :

Current Time
Thu Jul 20 10:58:22 CEST 2017
Configure Timezone
Europe/paris

But when I control one of my sites on the server, I note a gap:
Timezone PHP (server) +0 (unknown) UTC Daylight Saving Time: No
=> PHP time (server) 20/07/2017 08:58

So we have a deviation of 2 hours (summer time). We tried to confirm the zone and to restart the server but this gap is still present. Would you like an idea to help us?

Thank you.
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
471
113
UK
cPanel Access Level
Root Administrator
You may need to set up a custom php.ini file OR correct or introduce PHP script into your application to set the timezone for PHP

Please see date_default_timezone_set for more details
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
Hello,

You can browse to "WHM >> MultiPHP INI Editor" and use the "Editor Mode" tab for the version of PHP associated with the account to ensure the PHP "date.timezone" value is correct. It defaults to UTC.

Thank you.
 

canou83

Well-Known Member
Jul 20, 2016
78
7
8
France
cPanel Access Level
Website Owner
Hello,

You can browse to "WHM >> MultiPHP INI Editor" and use the "Editor Mode" tab for the version of PHP associated with the account to ensure the PHP "date.timezone" value is correct. It defaults to UTC.

Thank you.
Thanks, it's the good thing to do. It's OK.
 
  • Like
Reactions: cPanelMichael