I am getting following error whien i use php -i
date
date/time support => enabled "Olson" Timezone Database Version => 0.system Timezone Database => internal PHP Warning: Unknown: 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_timezon
e_set() function. In case you used any of those methods and you are still gettin
g this warning, you most likely misspelled the timezone identifier. We selected
'UTC' for 'UTC/0.0/no DST' instead in Unknown on line 0 Default timezone => UTCDirective => Local Value => Master Value date.default_latitude => 31.7667 => 31.7667 date.default_longitude => 35.2333 => 35.2333 date.sunrise_zenith => 90.583333 => 90.583333 date.sunset_zenith => 90.583333 => 90.583333 date.timezone => America/Los_Angeles => America/Los_Angeles
My /etc/php.ini has following setting
[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = America/Los_Angeles
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-latitude
;date.default_latitude = 31.7667
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-longitude
;date.default_longitude = 35.2333
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunrise-zenith
;date.sunrise_zenith = 90.583333
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.sunset-zenith
;date.sunset_zenith = 90.583333
PHP version details are as below
PHP 5.3.3 (cli) (built: Dec 5 2013 07:09:40) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Apache version as below
Server version: Apache/2.2.15 (Unix) Server built: Jul 18 2014 02:31:29
I have restarted Apache multiple times
phpinfo()
and show the path ofphp.ini
file? – Dileep Kumarphp -i
from a command prompt Apache is not involved at all. – Álvaro Gonzálezdate.timezone = "America/Los_Angeles"
, add double quote around. – Dileep Kumar