{"id":323,"date":"2014-06-20T23:23:44","date_gmt":"2014-06-20T23:23:44","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=323"},"modified":"2014-06-20T23:23:44","modified_gmt":"2014-06-20T23:23:44","slug":"mysql-and-system-time-diffrence","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/06\/20\/mysql-and-system-time-diffrence\/","title":{"rendered":"Mysql and System time diffrence"},"content":{"rendered":"<p>MySQL time zone different from system time zone<\/p>\n<p>the system time zone will be different than the one in MySQL, even though MySQL is set to use the system time zone. This normally means that a user has changed the system time zone, but they haven\u2019t started MySQL to cause it to change as well.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n$ date\nSun Jul  1 11:32:56 CDT 2007\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nmysql&gt; show variables like &#039;%time_zone%&#039;;\n+------------------+--------+\n| Variable_name    | Value  |\n+------------------+--------+\n| system_time_zone | PDT    |\n| time_zone        | SYSTEM |\n+------------------+--------+\n2 rows in set (0.00 sec)\n\n<\/pre>\n<p>If you find yourself in this situation, just restart MySQL and the situation should be fixed:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nmysql&gt; show variables like &#039;%time_zone%&#039;;\n+------------------+--------+\n| Variable_name    | Value  |\n+------------------+--------+\n| system_time_zone | CDT    |\n| time_zone        | SYSTEM |\n+------------------+--------+\n\n<\/pre>\n<p>Addon &#8211; check mysql time<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nmysql&gt; select NOW();\n+---------------------+\n| NOW() |\n+---------------------+\n| 2014-06-20 19:07:05 |\n+---------------------+\n1 row in set (0.00 sec)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>MySQL time zone different from system time zone the system time zone will be different than the one in MySQL, even though MySQL is set to use the system time zone. This normally means that a user has changed the system time zone, but they haven\u2019t started MySQL to cause it to change as well. &#8230; <a title=\"Mysql and System time diffrence\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/06\/20\/mysql-and-system-time-diffrence\/\" aria-label=\"Read more about Mysql and System time diffrence\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-323","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}