{"id":117,"date":"2020-02-21T02:38:00","date_gmt":"2020-02-21T02:38:00","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=117"},"modified":"2024-02-06T08:21:44","modified_gmt":"2024-02-06T13:21:44","slug":"php-warning-strtotime-it-is-not-safe-to-rely-on-the-systems-timezone-settings","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/php-warning-strtotime-it-is-not-safe-to-rely-on-the-systems-timezone-settings\/","title":{"rendered":"PHP Warning: strtotime(): It is not safe to rely on the system&#8217;s timezone settings"},"content":{"rendered":"\n<p>If a default timezone is not set in your php.ini, then you get the following warning:<\/p>\n\n\n\n<p>&#8220;Warning: strtotime(): It is not safe to rely on the system&#8217;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 &#8216;America\/Denver&#8217; for &#8216;CDT\/-6.0\/DST'&#8221;<\/p>\n\n\n\n<p>To get rid of this warning, open you php.ini file and set a value for date.timezone<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>date.timezone = 'America\/Edmonton'<\/code><\/pre>\n\n\n\n<p>The following list would help you in choosing your timezone<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>date.timezone = \"America\/Toronto\"\ndate.timezone = \"America\/Chicago\"\ndate.timezone = \"Asia\/Baghdad\"\ndate.timezone = \"Asia\/Baku\"\ndate.timezone = \"Asia\/Shanghai\"\ndate.timezone = \"Asia\/Islamabad\"\ndate.timezone = \"Australia\/Sydney\"\ndate.timezone = \"Australia\/Canberra\"\ndate.timezone = \"Europe\/London\"\ndate.timezone = \"Europe\/Berlin\"\ndate.timezone = \"Europe\/Paris\"\ndate.timezone = \"Europe\/Madrid\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If a default timezone is not set in your php.ini, then you get the following warning: &#8220;Warning: strtotime(): It is not safe to rely on the system&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,230],"tags":[24],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-php","category-qa","tag-php"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":118,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/117\/revisions\/118"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}