Jump to content

PHP Warning - Maintenance.php - date_default_timezone_get()


adTumbler

Recommended Posts

I am getting the following warning in our PHP logs.

PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.

i) This is a new install of 3.2.2 - I have checked that the system time zone is set - refer earlier issue in forums

ii) I have found the suggestion that I recompile Apache - but I can not do this as the site is hosted on a virtual server - which is provided by a service called Cloudways

Here is the full stack trace

From: [email protected] (Cron Daemon)                                                                                                                                        
To: [email protected]                                                                                                                                           
Subject: Cron <[email protected]> php /mysite/scripts/maintenance/maintenance.php ads.adtumbler.com                                      
Content-Type: text/plain; charset=UTF-8                                                                                                                                                       
X-Cron-Env: <SHELL=/bin/sh>                                                                                                                                                                   
X-Cron-Env: <HOME=/home/master>                                                                                                                                                               
X-Cron-Env: <PATH=/usr/bin:/bin>                                                                                                                                                              
X-Cron-Env: <LOGNAME=master_mysite>                                                                                                                                                       
Date: Thu, 24 Dec 2015 01:01:02 +0000 (UTC)                                                                                                                                                   
Status: R                                                                                                                                                                                     
                                                                                                                                                                                              
PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /mysite/lib/OX/Admin/Timezones.php on line 136                                                

PHP Stack trace:                                                                                                                                                                              
PHP   1. {main}() /mysite/scripts/maintenance/maintenance.php:0                                                                            
PHP   2. OX_Admin_Timezones::getTimezone() /mysite/scripts/maintenance/maintenance.php:30                                                  
PHP   3. date_default_timezone_get() /mysite/lib/OX/Admin/Timezones.php:136                                                                

PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /mysite/variables.php on line 67                                                              

PHP Stack trace:                                                                                                                                                                              
PHP   1. {main}() /mysite/scripts/maintenance/maintenance.php:0                                                                            
PHP   2. require_once() /mysite/scripts/maintenance/maintenance.php:33                                                                     
PHP   3. init() /mysite/init.php:139                                                                                                       
PHP   4. setupConfigVariables() /mysite/init.php:61                                                                                        
PHP   5. date_default_timezone_get() /mysite/variables.php:67                                                                        

Edited by adTumbler
Title updated typo
Link to comment
Share on other sites

  • 2 weeks later...

I am getting the following warning in our PHP logs.

PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.

This refers to the date.timezone setting that is in the php.ini file. That's where you need to set the appropriate timezone for your server. 

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.
Note: Your post will require moderator approval before it will be visible.

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...