Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: date() [function.date] - Getting this error code.


filmcell

Recommended Posts

Anyone help what the fix for this is please. I happened when my host upgraded to PHP version5.3.10

Many thanks

.

 

 

 

 

Warning: date() [function.date]: 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 'America/New_York' for 'EST/-5.0/no DST' instead in /home/******/public_html/**********.co.uk/includes/languages/english.php on line 633

 

Warning: strftime() [function.strftime]: 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 'America/New_York' for 'EST/-5.0/no DST' instead in /home/*****/public_html/**********.co.uk/includes/counter.php on line 27

 

Warning: strftime() [function.strftime]: 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 'America/New_York' for 'EST/-5.0/no DST' instead in /home/*****/public_html/********.co.uk/includes/footer.php on line 17

Link to comment
Share on other sites

Bob

 

I was playing around with KISS Error handling this morning and when I changed this

 

// calculate category path
 if (isset($HTTP_GET_VARS['cPath'])) {
$cPath = $HTTP_GET_VARS['cPath'];
 } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {
$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);
 }

 

to this

 

// calculate category path
 if (isset($HTTP_GET_VARS['cPath'])) {
$cPath = $HTTP_GET_VARS['cPath'];
 } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {
$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);
 } else {
$cPath = '';
 }

 

in includes application top line 472 odd, that error disappeared as well

 

I didn't stop to think about it but I am sure I just refreshed the page.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Hi,

 

ive already got this

 

// calculate category path

if (isset($HTTP_GET_VARS['cPath'])) {

$cPath = $HTTP_GET_VARS['cPath'];

} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {

$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);

} else {

$cPath = '';

}

.

 

Dont think thats the problem.

Link to comment
Share on other sites

It's because of the checking in 5.3. It is saying the timezone is explicitly set in your code and may cause a time miscalculation in some cases. That is almost not the case though. You can get rid of the error by hiding it by adding @ in front of the function call, like @@date, though that could involve a lot of changes. Using php's command date_default_timezone_set will fix the error. I haven't tried it but placing it in the includes/application_top.php file should work.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...