{"id":6022,"date":"2023-08-09T00:45:40","date_gmt":"2023-08-08T22:45:40","guid":{"rendered":"https:\/\/contabo.com\/blog\/?p=6022"},"modified":"2023-08-11T18:50:17","modified_gmt":"2023-08-11T16:50:17","slug":"change-the-timezone-on-a-vps-or-dedicated-server","status":"publish","type":"post","link":"https:\/\/contabo.com\/blog\/change-the-timezone-on-a-vps-or-dedicated-server\/","title":{"rendered":"How to Change the Timezone on a VPS\/Dedicated Server (Windows &#038; Linux)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"630\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds.jpg\" alt=\"\" class=\"wp-image-17295\" srcset=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds.jpg 1200w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds-600x315.jpg 600w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds-768x403.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Time_zone\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Timezone<\/a> configuration is a critical aspect of any server setup, ensuring accurate time representation and synchronization across various applications and services. Whether you&#8217;re managing a <a href=\"https:\/\/contabo.com\/en\/vps\" target=\"_blank\" rel=\"noreferrer noopener\">Virtual Private Server (VPS)<\/a> or a <a href=\"https:\/\/contabo.com\/en\/dedicated-servers\" target=\"_blank\" rel=\"noreferrer noopener\">Dedicated Server<\/a>, knowing how to change the timezone is a fundamental skill for every system administrator and server owner.<br>In this guide, we&#8217;ll provide simple step-by-step instructions, empowering you to synchronize time accurately and streamline server management. Get ready to wield complete control over your server&#8217;s time settings like a pro. Let&#8217;s begin!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-linux\">Linux<\/h2>\n\n\n\n<p>In order to change the current timezone on your VPS or Dedicated Server connect to your server as root via SSH<\/p>\n\n\n\n<p>To check the current date, time and timezone use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>date<\/code><\/pre>\n\n\n\n<p>On my server the output is the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Mon 7 Aug 2023 04:00:00 AM CEST  <\/pre>\n\n\n\n<p>As you can see, the current timezone is Central European Summer Time.<\/p>\n\n\n\n<p>To configure a different timezone use the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">timedatectl set-timezone [<em>new\/time_zone<\/em>]\n<\/pre>\n\n\n\n<p>The available time zones can be found in <em>\/usr\/share\/zoneinfo\/<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/l_timezones1-1024x200.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"200\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/l_timezones1-1024x200.png\" alt=\"Change the Timezone (timezone I)\" class=\"wp-image-6028\" srcset=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/l_timezones1-1024x200.png 1024w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/l_timezones1-300x59.png 300w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/l_timezones1-768x150.png 768w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/l_timezones1-1536x301.png 1536w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/l_timezones1.png 1860w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>If you go into the &#8220;Europe&#8221; folder and execute &#8220;ls&#8221; you will see ever city that is available to choose from:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/image.png\" alt=\"Change the Timezone (timezone II)\" class=\"wp-image-17232\" style=\"width:1036px;height:144px\" width=\"1036\" height=\"144\" srcset=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/image.png 836w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/image-600x83.png 600w, https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/image-768x107.png 768w\" sizes=\"auto, (max-width: 1036px) 100vw, 1036px\" \/><\/figure>\n\n\n\n<p>In our example we will set the timezone to Europe and Berlin. To do so, execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> root@server1:~# timedatectl set-timezone Europe\/London<\/pre>\n\n\n\n<p>After the timezone has been changes, the output of the &#8220;date&#8221; command will be the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Wed 11 Sep 2019 09:14:07 AM BST<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-windows\">Windows<\/h2>\n\n\n\n<p>In case you are running Windows Server on a VPS, please contact our support team (support@contabo.de) as there will be some further adjustments required to keep the changes permanently. One of our technicians will then gladly apply the new configuration.<\/p>\n\n\n\n<p>To get started, connect to your server using RDP. If you need help with that check out our Guide on &#8220;<a href=\"https:\/\/contabo.com\/blog\/connect-server-rdp\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to connect to my server using RDP<\/a>&#8220;<\/p>\n\n\n\n<p>Now press <strong>[Windows]<\/strong> + <strong>[R]<\/strong> to open the run dialog. Alternatively you can open the search bar by pressing the Windows-key and type in &#8220;run&#8221; followed by pressing <strong>[Enter]<\/strong><\/p>\n\n\n\n<p>Now paste in the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation\" \/v RealTimeIsUniversal \/t REG_QWORD \/d 1 \/f<\/code><\/pre>\n\n\n\n<p><em><strong>Explanation:<\/strong><\/em> Windows always takes the time from the BIOS clock, and the host server has only one BIOS<br>clock. Therefore all VPS have the same time zone set. This command creates a <em><strong>QWORD (64 Bit) Value<\/strong><\/em> in &#8220;<em>HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation<\/em>&#8221; called &#8220;<em><strong>RealTimeIsUniversal<\/strong><\/em>&#8221; and sets the value of it to &#8220;<em><strong>1<\/strong><\/em>&#8220;. This will allow the timezone of your instance to be different from the hostsystem ones.<\/p>\n\n\n\n<p>To continue open the settings by hitting <strong>[Windows] + [i]<\/strong> or search for &#8220;<em>Settings<\/em>&#8221; in the search bar.<\/p>\n\n\n\n<p>Now you can set the new time zone in &#8220;<em>Time &amp; Language<\/em>&#8221; -&gt; &#8220;<em>Date and Time<\/em>&#8220;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/w_timezones4.png\"><img decoding=\"async\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2019\/09\/w_timezones4.png\" alt=\"\" class=\"wp-image-7973\"\/><\/a><\/figure>\n\n\n\n<p>For the new changes to take effect, restart your server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to effortlessly change the timezone on your Windows- or Linux VPS or VDS with our step-by-step guide. <\/p>\n","protected":false},"author":50,"featured_media":17295,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[18],"tags":[],"ppma_author":[1491],"class_list":["post-6022","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"uagb_featured_image_src":{"full":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds.jpg",1200,630,false],"thumbnail":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds-150x150.jpg",150,150,true],"medium":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds-600x315.jpg",600,315,true],"medium_large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds-768x403.jpg",768,403,true],"large":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds.jpg",1200,630,false],"1536x1536":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds.jpg",1200,630,false],"2048x2048":["https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/08\/blog-head_how2-change-timezone-on-vps-and-ds.jpg",1200,630,false]},"uagb_author_info":{"display_name":"Tobias Mildenberger","author_link":"https:\/\/contabo.com\/blog\/author\/tobias\/"},"uagb_comment_info":0,"uagb_excerpt":"Learn how to effortlessly change the timezone on your Windows- or Linux VPS or VDS with our step-by-step guide.","authors":[{"term_id":1491,"user_id":50,"is_guest":0,"slug":"tobias","display_name":"Tobias Mildenberger","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/077178d5dce6c3d4c0c0396857a7e544bfdf8adf04145fff5160b33a22e28b1f?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/6022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/comments?post=6022"}],"version-history":[{"count":5,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/6022\/revisions"}],"predecessor-version":[{"id":17397,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/posts\/6022\/revisions\/17397"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media\/17295"}],"wp:attachment":[{"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/media?parent=6022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/categories?post=6022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/tags?post=6022"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/contabo.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=6022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}