{"id":293,"date":"2019-12-25T19:12:56","date_gmt":"2019-12-25T09:12:56","guid":{"rendered":"https:\/\/typicalhosting.com.au\/blog\/?p=293"},"modified":"2019-12-25T21:17:36","modified_gmt":"2019-12-25T11:17:36","slug":"timezone-htaccess","status":"publish","type":"post","link":"https:\/\/typicalhosting.com.au\/blog\/timezone-htaccess\/","title":{"rendered":"How to change your Websites TimeZone Using .htaccess"},"content":{"rendered":"<h2 style=\"text-align: center;\">Change Your Websites TimeZone Using .htaccess<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-315 aligncenter\" src=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/images-2-300x150.png\" alt=\"timezone htaccess\" width=\"624\" height=\"312\" srcset=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/images-2-300x150.png 300w, https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/images-2-640x321.png 640w, https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/images-2.png 710w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Do you need to change the timezone that your website is running on because you have set up a cron job or just have a clock with the local time on your website? well In this Post, we will show you how to change the timezone of your website using the .htaccess file.<\/p>\n<h2>Changing Your Websites Timezone with .htaccess File<\/h2>\n<p>Before we you go further, make sure you know what code your timezone is and what you want to use for your website. You can refer the PHP Site for a list of available timezones\u00a0<a href=\"http:\/\/www.php.net\/manual\/en\/timezones.php\" rel=\"noopener noreferrer\">&#8220;Here&#8221;<\/a>.<\/p>\n<p>Also if you are not familiar with or have not setup your FileZilla Client to connect to your website files follow our other tutorial &#8220;<a href=\"https:\/\/typicalhosting.com.au\/blog\/setup-filezilla\/\">Here<\/a>&#8220;.<\/p>\n<h2>How to Located Your .htaccess File Through FileZilla<\/h2>\n<p>your .htaccess file is found within your <strong>public_html<\/strong> folder within your hosting account. it is usually always located in the root directory of your website.<br \/>\nThe picture below is taken from FileZilla <a href=\"https:\/\/typicalhosting.com.au\/blog\/whats-an-ftp\/\">FTP<\/a>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-202\" src=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2018\/08\/htaccess4-1.png\" sizes=\"(max-width: 485px) 100vw, 485px\" srcset=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2018\/08\/htaccess4-1.png 485w, https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2018\/08\/htaccess4-1-300x168.png 300w\" alt=\"htaccess\" width=\"485\" height=\"271\" \/><\/p>\n<h2>How to Change Your Websites Timezone<\/h2>\n<ol>\n<li>Connect to the server and find <strong>.htacess<\/strong> file, right-click and press <strong>View\/Edit<\/strong>.<img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-301\" src=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/htacess-file-on-filezilla-1-300x176.png\" alt=\"\" width=\"530\" height=\"311\" srcset=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/htacess-file-on-filezilla-1-300x176.png 300w, https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/htacess-file-on-filezilla-1-640x375.png 640w, https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/htacess-file-on-filezilla-1.png 737w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/li>\n<li>Once your editor has opened, copy this code and past it into your .htaccess file :\n<div class=\"EnlighterJSWrapper classicEnlighterJSWrapper\">\n<div class=\"alert alert-warning\" role=\"alert\">\n<p><b>PLEASE NOTE: <\/b>If you have any existing code in your .htaccess file you will need to add this \u201cAbove\u201d your other .htaccess rules.<\/p>\n<\/div>\n<pre class=\"code_block\">php_value date.timezone \"Australia\/Sydney\"\r\n<\/pre>\n<\/div>\n<div class=\"alert alert-warning\" role=\"alert\">\n<p><b>NOTE: <\/b>Replace &#8220;Australia\/Sydney&#8221; with your preferred timezone.<\/p>\n<\/div>\n<\/li>\n<li>\n<div class=\"EnlighterJSWrapper classicEnlighterJSWrapper\"><\/div>\n<p>When Complete <strong>Save<\/strong> your .htaccess and within a few moments you will be prompted by FileZilla to Upload the File back to the Server as seen in the image below.<\/li>\n<li>Check the Option to \u201c<strong>Finish editing and delete local file\u201d<\/strong> and then click <strong>Yes<\/strong>.<img decoding=\"async\" loading=\"lazy\" class=\"wp-image-300 alignnone\" src=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/editing-htacessfile-through-filezilla-300x182.png\" alt=\"\" width=\"532\" height=\"323\" srcset=\"https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/editing-htacessfile-through-filezilla-300x182.png 300w, https:\/\/typicalhosting.com.au\/blog\/wp-content\/uploads\/2019\/12\/editing-htacessfile-through-filezilla.png 556w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/li>\n<li>The file will now be uploaded to your server. If FileZilla asks you to overwrite the file make sure you click overwrite and your all done.<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>This is a very simple process but most are not familiar with how to accomplish this. If all else fails please feel free to contact us via a \u201c<a href=\"https:\/\/typicalhosting.com.au\/am\/submitticket.php?step=2&amp;deptid=3\">Support ticket\u201d<\/a>. and we will do our best to assist you with any problems that you may occur.<\/p>\n<p>We hope this How-to has helped you. if you think I have missed anything please feel free to leave a comment below<\/p>\n<p>Thanks.<br \/>\nSimon M.<br \/>\nTypical Hosting<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Change Your Websites TimeZone Using .htaccess &nbsp; Do you need to change the timezone that your website is running on because you have set up a cron job or just have a clock with the local time on your website?&hellip; <a href=\"https:\/\/typicalhosting.com.au\/blog\/timezone-htaccess\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":315,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,4],"tags":[],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/posts\/293"}],"collection":[{"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":17,"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":316,"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions\/316"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/media\/315"}],"wp:attachment":[{"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/typicalhosting.com.au\/blog\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}