Jump to content

PHP Timezone error shown but timezone is correct in php.ini


Recommended Posts

Hi everyone,

I've been struggling with something really stupid and search through the community forums but can't seem to find a solution. 

I did a clean install of WHMCS 7.7.1. Now looking at System Health Status everything looks good but I have one outstanding issue which needs attention:

image.png.8f3b309bf40bfc2880316f1f1f2a2eb8.png


So I went to Utilities > System > PHP Info to see what the default timezone is, now looking at the file I can see it's set to Africa/Johannesburg, which is correct because I am based in South Africa. 


image.png.89591dffd29c52aa194410cb8fd55fdf.png


I also noticed that the default time shown in WHMCS in the top corner is about 2 hours behind, as seen here:

image.png.49cb62ccd906c8b806ef6ba9650f2e5d.png

I came across this post 

https://whmcs.community/topic/258453-server-time-correct-whmcs-not/

Where @AffordableDomainsCanada made a suggestion to add the following within the configuration.php file:

 

date_default_timezone_set('America/Toronto');



Now this corrected the time displayed within WHMCS, so thanks @AffordableDomainsCanada.

All I want to know is how do I get the PHP Timezone issue removed from the System Status? Something else has to be wrong as the php.ini clearly shows Africa/Johannesburg. I might be missing something.

Any advice would greatly be appreciated 😀

Edited by Mocke
Link to comment
Share on other sites

Hi @Mocke

Have you had a look in your systems 'php.ini' file as what you shown is the default timezone.

You need to set date.timezone within the 'php.ini' file directly if you look in the Utilities > System > PHP Info screen on my system 6 lines down I have the 'date.timezone' setting shown

 

~Regards,

Scott

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated