Forum Archive - time zone warning

time zone warning
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
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
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
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 amReplies: 3Post by: reyesrios
WP_Widget Incompatibility WarningJan 20, 2016 7:30 pmReplies: 1Post by: judahn
Transfer only the second time.Oct 28, 2015 7:26 pmReplies: 1Post by: serdmitriy
Warning: trim() expects parameter 1 to be string, array giveMar 30, 2015 5:14 pmReplies: 11Post by: ejb01
What is the source of this warning?Mar 11, 2015 4:31 amReplies: 3Post by: innerself

Try GTranslate with a free 15 day trial