{"id":14835,"date":"2024-10-09T12:12:30","date_gmt":"2024-10-09T12:12:30","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=14835"},"modified":"2024-10-09T15:06:22","modified_gmt":"2024-10-09T15:06:22","password":"","slug":"how-to-change-the-time-zone-on-ubuntu-server","status":"publish","type":"docs","link":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/","title":{"rendered":"How to Change the Time Zone on Ubuntu Server"},"content":{"rendered":"\n<p>Setting the correct time zone on your  server ensures that your system logs and time-based tasks (like cron jobs) run accurately based on the local time of your server&#8217;s location. Here\u2019s a step-by-step guide on how to change the time zone on an Ubuntu server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ubuntu server<\/strong>: Any version (18.04, 20.04, 22.04)<\/li>\n\n\n\n<li><strong>Root or Sudo privileges<\/strong>: You need administrative access to modify system settings.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 1: Check the Current Time Zone<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the command below to check<\/li>\n\n\n\n<li>The output will show the current system time, time zone, and other related details. Look for the line labeled <code>Time zone<\/code>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>timedatectl<\/strong><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"212\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217.png\" alt=\"\" class=\"wp-image-14853\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217.png 510w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217-300x125.png 300w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 2: List Available Time Zones<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To set the time zone, you\u2019ll need to know the correct name of the time zone you want to set.<\/li>\n\n\n\n<li>You can view the list of available time zones by running:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>timedatectl list-timezones<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This will display a comprehensive list of time zones, such as:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>America\/New_York\nEurope\/London\nAsia\/Tokyo\nAfrica\/Nairobi<\/strong><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Scroll through the list to find your desired time zone.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 3: Set the New Time Zone<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once you&#8217;ve identified the correct time zone, use the <code>timedatectl<\/code> command to set it. For example, to set the time zone to &#8220;Africa\/Nairobi&#8221;, you would run:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo timedatectl set-timezone Africa\/Nairobi<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can replace <code>Africa\/Nairobi<\/code> with the appropriate time zone from the list.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"287\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-218.png\" alt=\"\" class=\"wp-image-14857\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-218.png 576w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-218-300x149.png 300w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Step 4: Verify the New Time Zone<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After changing the time zone, verify that the changes were applied successfully by running:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>timedatectl<\/strong><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"496\" height=\"226\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-219.png\" alt=\"\" class=\"wp-image-14858\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-219.png 496w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-219-300x137.png 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/figure>\n\n\n\n<p><strong>Step 5: Restart Services<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Most services should automatically pick up the new time zone. However, for certain applications (e.g., cron jobs or logging services), you may want to restart them to ensure they use the updated time zone.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>sudo systemctl restart cron<\/strong><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Setting the correct time zone on your server ensures that your system logs and time-based tasks (like cron jobs) run accurately based on the local time of your server&#8217;s location. Here\u2019s a step-by-step guide on how to change the time zone on an Ubuntu server. Prerequisites Step 1: Check the Current Time Zone Step 2: [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1820,1824,1879,2128],"doc_tag":[],"class_list":["post-14835","docs","type-docs","status-publish","hentry","doc_category-cloud-servers-in-kenya","doc_category-dedicated-servers","doc_category-servers","doc_category-vps-servers"],"year_month":"2026-06","word_count":280,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Eugene","author_nicename":"eugene","author_url":"https:\/\/www.truehost.com\/support\/author\/eugene\/"},"doc_category_info":[{"term_name":"Cloud servers in Kenya","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/cloud-servers-in-kenya\/"},{"term_name":"dedicated servers","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/dedicated-servers\/"},{"term_name":"Servers","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/servers\/"},{"term_name":"VPS-Servers","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/vps-servers\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Change the Time Zone on Ubuntu Server -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change the Time Zone on Ubuntu Server -\" \/>\n<meta property=\"og:description\" content=\"Setting the correct time zone on your server ensures that your system logs and time-based tasks (like cron jobs) run accurately based on the local time of your server&#8217;s location. Here\u2019s a step-by-step guide on how to change the time zone on an Ubuntu server. Prerequisites Step 1: Check the Current Time Zone Step 2: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-09T15:06:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/\",\"name\":\"How to Change the Time Zone on Ubuntu Server -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-217.png\",\"datePublished\":\"2024-10-09T12:12:30+00:00\",\"dateModified\":\"2024-10-09T15:06:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-217.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-217.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-change-the-time-zone-on-ubuntu-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change the Time Zone on Ubuntu Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change the Time Zone on Ubuntu Server -","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:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/","og_locale":"en_US","og_type":"article","og_title":"How to Change the Time Zone on Ubuntu Server -","og_description":"Setting the correct time zone on your server ensures that your system logs and time-based tasks (like cron jobs) run accurately based on the local time of your server&#8217;s location. Here\u2019s a step-by-step guide on how to change the time zone on an Ubuntu server. Prerequisites Step 1: Check the Current Time Zone Step 2: [&hellip;]","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/","article_modified_time":"2024-10-09T15:06:22+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/","name":"How to Change the Time Zone on Ubuntu Server -","isPartOf":{"@id":"https:\/\/www.truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217.png","datePublished":"2024-10-09T12:12:30+00:00","dateModified":"2024-10-09T15:06:22+00:00","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/10\/image-217.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-change-the-time-zone-on-ubuntu-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Change the Time Zone on Ubuntu Server"}]},{"@type":"WebSite","@id":"https:\/\/www.truehost.com\/support\/#website","url":"https:\/\/www.truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/www.truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/www.truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/www.truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs\/14835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/comments?post=14835"}],"version-history":[{"count":5,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs\/14835\/revisions"}],"predecessor-version":[{"id":14859,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs\/14835\/revisions\/14859"}],"wp:attachment":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/media?parent=14835"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=14835"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=14835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}