{"id":8448,"date":"2021-01-01T06:53:00","date_gmt":"2021-01-01T06:53:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8448"},"modified":"2025-09-01T04:52:33","modified_gmt":"2025-09-01T04:52:33","slug":"how-to-convert-utc-to-local-time-in-mysql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/","title":{"rendered":"How to Convert UTC to Local Time in MySQL"},"content":{"rendered":"\n<p>MySQL allows you to store date &amp; time values pertaining to different time zones. Sometimes you may need to change UTC to local time in MySQL. This is commonly required if your users are located in different time zones. In such cases, web developers convert all date &amp; time information to UTC and then store it in database. While retrieving this information, they convert UTC to local time before sending it to the client web browser. In this article, we will look at how to convert UTC to local time in MySQL using <em>convert_tz<\/em> function.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#How_to_Convert_UTC_to_Local_Time_in_MySQL\" >How to Convert UTC to Local Time in MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#1_Using_String_Literals\" >1. Using String Literals<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#2_Using_MySQL_Functions\" >2. Using MySQL Functions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#3_Using_Columns\" >3. Using Columns<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Convert_UTC_to_Local_Time_in_MySQL\"><\/span>How to Convert UTC to Local Time in MySQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Actually, if you are displaying datetime values on your web pages, then the web browser automatically converts datetime values to local time zone. So all you need to do is retrieve datetime values in UTC and send it to the client. However, if you need to convert datetime values for other purposes, then you will need to convert UTC to local time.<\/p>\n\n\n\n<p>You can easily convert UTC to local time in MySQL using <em>convert_tz<\/em> function. Here is the syntax for convert_tz function.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">convert_tz(date_value, original_timezone, new_timezone)<\/pre>\n\n\n\n<p>In the above function you need to specify date value as a literal string, system function or column name, its original time zone, as well as its new time zone.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Using_String_Literals\"><\/span>1. Using String Literals<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here is an example to convert date time value from UTC to local time zone (GMT+10:00). By default, you need to specify original (+00:00) and new time zones (+10:00) as offsets from UTC.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; SELECT CONVERT_TZ('2018-06-15 12:00:00','+00:00','+10:00');\n +-----------------------------------------------------+\n | CONVERT_TZ('2018-06-15 12:00:00','+00:00','+10:00') |\n +-----------------------------------------------------+\n | 2018-06-15 22:00:00                                 |\n +-----------------------------------------------------+<\/pre>\n\n\n\n<p>You can also specify time zones instead of offsets. However, in this case, you will need to download and install&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/dev.mysql.com\/downloads\/timezones.html\" target=\"_blank\">MySQL time zones<\/a>&nbsp;on your server. Here\u2019s an example to convert EST to Paris timezone by specifying time zone names instead of offset values.<\/p>\n\n\n\n<pre id=\"block-747871ac-a7b6-4e6b-bcbb-7cb7ad95a2fb\" class=\"wp-block-preformatted\">mysql&gt; select convert_tz('2020-09-17 03:00:00','US\/Eastern','Europe\/Paris');<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Using_MySQL_Functions\"><\/span>2. Using MySQL Functions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can also use system functions like<em> now()<\/em> in <em>convert_tz<\/em> function to convert current date time to other time zones, as shown below. In this case, convert_tz will work on the result of MySQL functions like now(), curdate(), etc.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select convert_tz(<strong>now()<\/strong>,'+00:00','-05:00');\n+-------------------------------------+\n| convert_tz(now(),'+00:00','-05:00') |\n+-------------------------------------+\n| 2020-09-17 04:45:07                 |\n+-------------------------------------+<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Using_Columns\"><\/span>3. Using Columns<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Similarly, you can also convert date, time, date time columns using convert_tz. Here\u2019s an example to change time zone of&nbsp;<em>order_date<\/em>&nbsp;column in&nbsp;<em>sales<\/em>&nbsp;table, from UTC to EST. Let us say you have the following MySQL table.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; create table sales(id int, amount int, order_date datetime);<br>mysql&gt; insert into sales(id, amount, order_date) <br>       values(1, 150, '2024-07-03 14:20'),<br>       (2, 250, '2024-07-03 16:40'),<br>       (3, 200, '2024-07-03 20:25');<br><br>mysql&gt; select * from sales;<br>+------+--------+---------------------+<br>| id   | amount | order_date          |<br>+------+--------+---------------------+<br>|    1 |    150 | 2024-07-03 14:20:00 |<br>|    2 |    250 | 2024-07-03 16:40:00 |<br>|    3 |    200 | 2024-07-03 20:25:00 |<br>+------+--------+---------------------+<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; select convert_tz(order_date,'+00:00','-05:00') from sales;<br>+------------------------------------------+<br>| convert_tz(order_date,'+00:00','-05:00') |<br>+------------------------------------------+<br>| 2024-07-03 09:20:00                      |<br>| 2024-07-03 11:40:00                      |<br>| 2024-07-03 15:25:00                      |<br>+------------------------------------------+<\/pre>\n\n\n\n<p>Hopefully, now you can change MySQL time zone in query and convert date, time, datetime values from one timezone to another.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt how to convert datetime value in UTC to local time zone. Generally, websites store all datetime values in UTC time zone and convert it to different time zones, in case their users are located in different time zones. You can use convert_tz() function for converting datetime values from one time zone to another. It works well with string literals, function results as well as columns.<\/p>\n\n\n\n<p><a href=\"http:\/\/ubiq.co\/\">Ubiq<\/a>&nbsp;makes it easy to visualize data in minutes, and monitor in real-time dashboards.&nbsp;<a href=\"http:\/\/ubiq.co\/accounts\/register\">Try it<\/a>&nbsp;Today!<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-get-current-date-and-time-in-mysql\/\">How to Get Current Date &amp; Time in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-group-by-month-in-mysql\/\">How to Group By Month in MySQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-remove-not-null-constraint-in-mysql\/\">How to Remove NOT NULL Constraint in MySQL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to change UTC to local time in MySQL. Here is how to convert UTC to local time in MySQL.<\/p>\n","protected":false},"author":1,"featured_media":8451,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[324],"tags":[458],"class_list":["post-8448","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-convert_tz"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Convert UTC to Local Time in MySQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes you may need to change UTC to local time in MySQL. Here is how to convert UTC to local time in MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Convert UTC to Local Time in MySQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes you may need to change UTC to local time in MySQL. Here is how to convert UTC to local time in MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-01T06:53:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-01T04:52:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2021\/01\/MySQL-convert-utc-to-local-time.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Convert UTC to Local Time in MySQL\",\"datePublished\":\"2021-01-01T06:53:00+00:00\",\"dateModified\":\"2025-09-01T04:52:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/\"},\"wordCount\":540,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1\",\"keywords\":[\"convert_tz\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/\",\"name\":\"How to Convert UTC to Local Time in MySQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1\",\"datePublished\":\"2021-01-01T06:53:00+00:00\",\"dateModified\":\"2025-09-01T04:52:33+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes you may need to change UTC to local time in MySQL. Here is how to convert UTC to local time in MySQL.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1\",\"width\":730,\"height\":410,\"caption\":\"convert utc to local time in mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-convert-utc-to-local-time-in-mysql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Convert UTC to Local Time in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Convert UTC to Local Time in MySQL - Ubiq BI","description":"Sometimes you may need to change UTC to local time in MySQL. Here is how to convert UTC to local time in MySQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How to Convert UTC to Local Time in MySQL - Ubiq BI","og_description":"Sometimes you may need to change UTC to local time in MySQL. Here is how to convert UTC to local time in MySQL.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2021-01-01T06:53:00+00:00","article_modified_time":"2025-09-01T04:52:33+00:00","og_image":[{"width":730,"height":410,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2021\/01\/MySQL-convert-utc-to-local-time.webp","type":"image\/webp"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Convert UTC to Local Time in MySQL","datePublished":"2021-01-01T06:53:00+00:00","dateModified":"2025-09-01T04:52:33+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/"},"wordCount":540,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2021\/01\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1","keywords":["convert_tz"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/","name":"How to Convert UTC to Local Time in MySQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2021\/01\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1","datePublished":"2021-01-01T06:53:00+00:00","dateModified":"2025-09-01T04:52:33+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes you may need to change UTC to local time in MySQL. Here is how to convert UTC to local time in MySQL.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2021\/01\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2021\/01\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1","width":730,"height":410,"caption":"convert utc to local time in mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-convert-utc-to-local-time-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Convert UTC to Local Time in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2021\/01\/MySQL-convert-utc-to-local-time.webp?fit=730%2C410&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2cg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=8448"}],"version-history":[{"count":3,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8448\/revisions"}],"predecessor-version":[{"id":9371,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8448\/revisions\/9371"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8451"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}