{"id":21,"date":"2017-10-08T05:10:00","date_gmt":"2017-10-08T05:10:00","guid":{"rendered":"https:\/\/linuxadmin.melberi.com\/uncategorized\/not-safe-to-rely-on-systems-timezone"},"modified":"2017-10-08T13:06:36","modified_gmt":"2017-10-08T13:06:36","slug":"not-safe-to-rely-timezone","status":"publish","type":"post","link":"https:\/\/www.melberi.com\/linuxadmin\/php\/not-safe-to-rely-timezone","title":{"rendered":"It is not safe to rely on the system&#8217;s timezone settings : PHP Date Error Cacti"},"content":{"rendered":"<p>Apache Error: It is not safe to rely on the system&#8217;s timezone settings\u00a0php.ini Cacti, wordpress, joomla, phpmyadmin, phpinfo, zabbix, drupal, symfony, cakephp, codeigniter bitrix CentOS<\/p>\n<p>After Upgrading the PHP, following error message was coming in the httpd error_log log<\/p>\n<h3><u>PHP Error<\/u><\/h3>\n<p><b>#tail -f \/var\/log\/httpd\/error_log <\/b><\/p>\n<p><span style=\"color: #808080;\">[Fri Jul 23 17:15:31 2010] [error] [client ] PHP Warning:\u00a0 date() [function.date]: It is not safe to rely on the system&#8217;s timezone settings. <\/span><br \/>\n<span style=\"color: #808080;\">You are *required* to use the date.timezone setting or the date_default_timezone_set() function. <\/span><br \/>\n<span style=\"color: #808080;\">In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. <\/span><br \/>\n<span style=\"color: #808080;\">We selected &#8216;Asia\/Calcutta&#8217; for &#8216;IST\/5.0\/no DST&#8217; instead in \/IlohaMail\/include\/ryosimap.inc on line 117, referer:<\/span><\/p>\n<h3><u><b>Solution<\/b>:<\/u><\/h3>\n<p>1. Edit the php.ini file and Set the correct time zone.<br \/>\nThe default location of the file is \/etc\/php.ini<\/p>\n<p><b>#vim \/etc\/php.ini<\/b><br \/>\n<b><br \/>\n2. Search for &#8216;timezone&#8217; in php.ini file and change it as show below<\/b><\/p>\n<p><b>;date.timezone =<\/b><br \/>\nto<br \/>\n<b>date.timezone = &#8220;America\/New_York&#8221;<\/b><br \/>\nor whatever specific timezone you are in.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache Error: It is not safe to rely on the system&#8217;s timezone settings\u00a0php.ini Cacti, wordpress, joomla, phpmyadmin, phpinfo, zabbix, drupal, symfony, cakephp, codeigniter bitrix CentOS After Upgrading the PHP, following&#8230; <a href=\"https:\/\/www.melberi.com\/linuxadmin\/php\/not-safe-to-rely-timezone\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102,103],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/21"}],"collection":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":5,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":454,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/21\/revisions\/454"}],"wp:attachment":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}