time zone warning
Nov 20, 2011 12:19 pm by amir00251
Nov 20, 2011 12:19 pm by amir00251
Hello,
I get this warning when selecting other languages on site.
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 'UTC' for 'GMT/0.0/no DST' instead in /var/www/vhosts/domain.com/httpdocs/gtranslate/translate.php on line 421
Is there any solution. I get that even when error display is set to none.
Re: time zone warning
Nov 20, 2011 12:42 pm by Edvard
Nov 20, 2011 12:42 pm by Edvard
It is your PHP configuration. If you google the error you get you will find a solution.
Re: time zone warning
Nov 21, 2011 10:58 am by Jarrell22
Nov 21, 2011 10:58 am by Jarrell22
There was a reason I didn't do that in the first place, but I agree we need a fallback setting now. I can't believe PHP is yelling about this, but anyway...
One change is needed, I have to make it:
<?php
if (function_exists('date_default_timezone_set')) {
date_default_timezone_set(date_default_timezone_name());
}
?>
Because in Drupal 6 we still support PHP4, where that function does not exist. We won't need that test in Drupal 7.
Re: time zone warning
Nov 21, 2011 11:55 am by Edvard
Nov 21, 2011 11:55 am by Edvard
If you have access to php.ini file you can set a correct timezone there otherwise you can solve that issue with your hosting provider.
SIMILAR TOPICS
Translated pages fail to load almost half the time. | Sep 12, 2017 5:24 am | Replies: 3 | Post by: reyesrios |
WP_Widget Incompatibility Warning | Jan 20, 2016 7:30 pm | Replies: 1 | Post by: judahn |
Transfer only the second time. | Oct 28, 2015 7:26 pm | Replies: 1 | Post by: serdmitriy |
Warning: trim() expects parameter 1 to be string, array give | Mar 30, 2015 5:14 pm | Replies: 11 | Post by: ejb01 |
What is the source of this warning? | Mar 11, 2015 4:31 am | Replies: 3 | Post by: innerself |