{"id":480,"date":"2012-11-16T14:46:51","date_gmt":"2012-11-16T14:46:51","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2012\/11\/16\/htacess-change-timezone\/"},"modified":"2021-08-16T23:29:09","modified_gmt":"2021-08-17T03:29:09","slug":"htacess-change-timezone","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/","title":{"rendered":"How to Change Your Default Timezone in .htaccess"},"content":{"rendered":"<p>The <strong>.htaccess<\/strong> file is a hidden text file within your hosting account that can be very powerful. It is designed so that you can modify it to change the behavior of your website that normally would take higher access beyond your account. It acts as a liaison between your domain and the server and can perform many functions.<\/p>\n<p>The server has a specific time setting. This is usually based on the servers physical location, for example, if the datacenter that houses the server is located in California, the server will most likely be set to the Pacific Time. Some sites may cater to specific areas of the world and wish to use the timezone for that area. PHP has configuration files that can do this, but what about other tiles such as HTML or Log files? That is where the htaccess comes into play. Below are instructions for changing the base timezone in your local htaccess file.<\/p>\n<p class=\"alert\" style=\"color: red;\">When using <em>PHP 5.3<\/em> or newer, you may be required to set the <em>timezone<\/em> in the <strong>php.ini<\/strong> file, which is explained in our guide titled <a href=\"\/support\/website\/set-timezone-in-php\/\" target=\"_blank\" rel=\"noopener noreferrer\">Setting the timezone for php in the php.ini file<\/a>.<\/p>\n<h2>Changing your Default Timezone:<\/h2>\n<ol class=\"article_list\">\n<li><a href=\"\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\">Log into your cPanel<\/a>.<\/li>\n<li><!-- PL_fix_Selection_01.png -->Find the <strong>Files <\/strong>category and click on the <strong>File Manager<\/strong> icon.<br><a href=\"\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png\" rel=\"lightbox-0\"><img decoding=\"async\" width=\"497\" height=\"323\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png\" class=\"optimized-lcp-image\" alt=\"cpanel\" loading=\"eager\" fetchpriority=\"high\" sizes=\"(max-width: 768px) 100vw, 768px\"><\/a>\n<div style=\"clear: both;\">\u00a0<\/div>\n<\/li>\n<li><!-- settings image Selection 3-->Click <strong>Settings<\/strong> at the top right corner.\n<p><a href=\"\/support\/wp-content\/uploads\/2012\/11\/cpanel_plfix_PL_fix_Selection_03.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"std_ss size-full wp-image-5735\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/11\/cpanel_plfix_PL_fix_Selection_03.png\" alt=\"cpanel\" width=\"500\" height=\"400\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/11\/cpanel_plfix_PL_fix_Selection_03.png 500w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/11\/cpanel_plfix_PL_fix_Selection_03-300x240.png 300w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/a><\/p>\n<\/li><li>Select the <strong>Document Root<\/strong> for your domain and be sure the checkbox next to <strong>Show Hidden Files<\/strong> is checked. Click the <strong>Save<\/strong> button.<br><a href=\"\/support\/wp-content\/uploads\/2012\/07\/cpanel_plfix_PL_fix_Selection_02.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"std_ss size-full wp-image-5559\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_plfix_PL_fix_Selection_02.png\" alt=\"file-manager-show-hidden\" width=\"524\" height=\"380\"><\/a>\n<div style=\"clear: both;\">\u00a0<\/div>\n<\/li>\n<li>Look for the <em>.htaccess<\/em> file and right click on it. This brings up a menu. Find and click on the <strong>Edit <\/strong>option.<br><!-- PL_fix_Selection_04.png --><a href=\"\/support\/wp-content\/uploads\/2012\/07\/cpanel_plfix_PL_fix_Selection_04.png\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" class=\"std_ss size-full wp-image-5560\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_plfix_PL_fix_Selection_04.png\" alt=\"file-manager-htaccess\" width=\"500\" height=\"400\"><\/a>\n<div style=\"clear: both;\">\u00a0<\/div>\n<\/li>\n<li>Now that you are in the htaccess editor, paste the following code at the top of the page to configure your account. In this example, we are setting the timezone to Eastern Standard Time.\n<br><code>#Adjust default time zone <br>SetEnv TZ America\/Washington<\/code>\n<\/li>\n<li>Be sure to hit the <strong>Save Changes<\/strong> button in the upper right corner to save your new htaccess configuration.<\/li>\n\n<p>Congratulations, now you know how to change your <em>default timezone<\/em> in the <strong>.htaccess<\/strong> file!<\/p>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>The .htaccess file is a hidden text file within your hosting account that can be very powerful. It is designed so that you can modify it to change the behavior of your website that normally would take higher access beyond your account. It acts as a liaison between your domain and the server and can<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\"> Read More ><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4288],"tags":[],"class_list":["post-480","post","type-post","status-publish","format-standard","hentry","category-website"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Change Your Default Timezone in .htaccess | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn to adjust the default time zone for your account in the htaccess file.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change Your Default Timezone in .htaccess | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn to adjust the default time zone for your account in the htaccess file.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-16T14:46:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T03:29:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png\" \/>\n<meta name=\"author\" content=\"Scott Mitchell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Scott Mitchell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\"},\"author\":{\"name\":\"Scott Mitchell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\"},\"headline\":\"How to Change Your Default Timezone in .htaccess\",\"datePublished\":\"2012-11-16T14:46:51+00:00\",\"dateModified\":\"2021-08-17T03:29:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\"},\"wordCount\":341,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png\",\"articleSection\":[\"Website\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\",\"name\":\"How to Change Your Default Timezone in .htaccess | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png\",\"datePublished\":\"2012-11-16T14:46:51+00:00\",\"dateModified\":\"2021-08-17T03:29:09+00:00\",\"description\":\"Learn to adjust the default time zone for your account in the htaccess file.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png\",\"width\":497,\"height\":323,\"caption\":\"cpanel\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change Your Default Timezone in .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\",\"name\":\"Scott Mitchell\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change Your Default Timezone in .htaccess | InMotion Hosting","description":"Learn to adjust the default time zone for your account in the htaccess file.","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:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/","og_locale":"en_US","og_type":"article","og_title":"How to Change Your Default Timezone in .htaccess | InMotion Hosting","og_description":"Learn to adjust the default time zone for your account in the htaccess file.","og_url":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2012-11-16T14:46:51+00:00","article_modified_time":"2021-08-17T03:29:09+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png","type":"","width":"","height":""}],"author":"Scott Mitchell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Scott Mitchell","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/"},"author":{"name":"Scott Mitchell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed"},"headline":"How to Change Your Default Timezone in .htaccess","datePublished":"2012-11-16T14:46:51+00:00","dateModified":"2021-08-17T03:29:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/"},"wordCount":341,"commentCount":5,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png","articleSection":["Website"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/","url":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/","name":"How to Change Your Default Timezone in .htaccess | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png","datePublished":"2012-11-16T14:46:51+00:00","dateModified":"2021-08-17T03:29:09+00:00","description":"Learn to adjust the default time zone for your account in the htaccess file.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2012\/07\/cpanel_lanternUpdatesMay17_cmPape_01.png","width":497,"height":323,"caption":"cpanel"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/website\/htacess-change-timezone\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Change Your Default Timezone in .htaccess"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed","name":"Scott Mitchell","url":"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=480"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/480\/revisions"}],"predecessor-version":[{"id":85304,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/480\/revisions\/85304"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}