Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Timezone setting error


Kjolebutikken

Recommended Posts

Hi,

 

I get this error in my error log:

 

PHP Strict Standards: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Chicago' for 'CDT/-5.0/DST' instead in /home/kjolegal/public_html/butikk/product_thumb.php on line 113, referer: http://kjolegalleriet.no/butikk/index.php

 

In line 113 in catalog/product_thumb.php I have:

 

//Build our entity tag, which is "inode-lastmodtime-filesize"
	$lastModified = filemtime($file);
	$lastModifiedGMT = $lastModified - date('Z');
	$lastModifiedHttpFormat = gmstrftime("%a, %d %b %Y %T %Z", $lastModified);

 

I think I need to change the Z in:

 

$lastModifiedGMT = $lastModified - date('Z');

 

 

But to what?

 

Country is Norway. In zone table in database I have:

zone_id: 188

zone_country_id: 160

 

 

Anybody know how to fix this?

 

 

Thanks :-)

Best regards

Kjolebutikken

Link to comment
Share on other sites

No, you would not change the 'Z' code. What you could try doing is at the top of your application_top.php files (after the <?php line) is add

date_default_timezone_set('Europe/Oslo');

 

 

Thanks :-) I have STS. Tried to add this in my files:

catalog/includes/application_top.php

catalog/includes/application_top1.php

 

But error is still there.

Best regards

Kjolebutikken

Link to comment
Share on other sites

It sounds like you're missing the date_default_timezone_set() call on some page. Check that application_top.php or some other file is included/required on every page, and don't forget your admin/ version.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...