{"id":14147,"date":"2026-05-11T01:00:00","date_gmt":"2026-05-11T05:00:00","guid":{"rendered":"https:\/\/www.both.org\/?p=14147"},"modified":"2026-05-10T07:59:53","modified_gmt":"2026-05-10T11:59:53","slug":"changing-the-timezone-in-fedora","status":"publish","type":"post","link":"https:\/\/www.both.org\/?p=14147","title":{"rendered":"Changing the timezone in Fedora"},"content":{"rendered":"<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"14147\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><\/div>\n<p>When I installed Fedora 44 recently, I forgot one important detail: I didn&#8217;t set the time zone. Oops. I live in the US, in the Central time zone, but Fedora thinks it is running in the Eastern time zone.<\/p>\n\n\n\n<p>You can click an option when installing Fedora to let the system set the time zone automatically based on your IP address. This is a very handy feature for people with laptops who travel all the time.<\/p>\n\n\n\n<p>Another way to use the time zone is to set every server to use the Coordinated Universal Time (UTC) time zone. If you&#8217;re running a server in a cluster or service pool, you should use UTC so that your systems will always agree on the time.<\/p>\n\n\n\n<p>But this is a desktop machine, and it will always be in the Central time zone. I wanted to change it to use just the US Central time zone.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-my-time-zone\">What is my time zone<\/h2>\n\n\n\n<p>There are two ways to check your time zone on modern Linux systems. For systems that use <strong>systemd<\/strong>, you can use <strong>timedatectl<\/strong> command. To view your system&#8217;s current time zone, use the <strong>timedatectl<\/strong> command with the <code>status<\/code> option. This displays several details about your system time, including the local time, universal time, whether or not your system is synchronized using a Network Time Protocol, and (most importantly, for me) what&#8217;s your time zone:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ timedatectl status\n               Local time: Mon 2026-05-04 15:45:14 EDT\n           Universal time: Mon 2026-05-04 19:45:14 UTC\n                 RTC time: Mon 2026-05-04 19:45:14\n                Time zone: America\/New_York (EDT, -0400)\nSystem clock synchronized: yes\n              NTP service: active\n          RTC in local TZ: no<\/code><\/pre>\n\n\n\n<p>From that output, I can see my system is currently set for the <code>America\/New_York<\/code> time zone.<\/p>\n\n\n\n<p>Another way to check the time zone is to look at the <em>\/etc\/localtime<\/em> file. This is also provided by <strong>systemd<\/strong> and is a symbolic link to a binary file that contains information about a specific time zone. The time zone files are located in the <em>\/usr\/share\/zoneinfo<\/em> directory, such as <em>\/usr\/share\/zoneinfo\/America\/Chicago<\/em> for the <code>America\/Chicago<\/code> time zone, or <em>\/usr\/share\/zoneinfo\/US\/Central<\/em> for the <code>US\/Central<\/code> time zone. Since Chicago is in the US Central time zone, <em>\/usr\/share\/zoneinfo\/America\/Chicago<\/em> and <em>\/usr\/share\/zoneinfo\/US\/Central<\/em> contain the same time zone data. You can verify this for yourself by using a program like <strong>md5sum<\/strong> to view the checksums for each:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ md5sum \/usr\/share\/zoneinfo\/US\/Central \/usr\/share\/zoneinfo\/America\/Chicago \n6fa8d772c5ff1c47ca4b0ad477f72d48  \/usr\/share\/zoneinfo\/US\/Central\n6fa8d772c5ff1c47ca4b0ad477f72d48  \/usr\/share\/zoneinfo\/America\/Chicago<\/code><\/pre>\n\n\n\n<p>So for my system, I want to set the time zone to either <code>US\/Central<\/code> or <code>America\/Chicago<\/code>. Both are correct, but I decided to set it to <code>US\/Central<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"list-available-time-zones\">List available time zones<\/h2>\n\n\n\n<p>To set the time zone, you need to know the possible valid values. To do that, use the <strong>timedatectl<\/strong> command with the <code>list-timezones<\/code> command. This prints a long list (almost 600 entries) but I&#8217;m only interested in time zones that contain the text &#8220;central&#8221;, which should match my preferred US Central time zone. I also used <strong>grep<\/strong> to filter the list and print only those matching lines:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ timedatectl list-timezones | wc -l\n598\n\n$ timedatectl list-timezones | grep -i central\nCanada\/Central\nUS\/Central<\/code><\/pre>\n\n\n\n<p>Another way to list the available time zones is to look in the <em>\/usr\/share\/zoneinfo<\/em> directory, which contains a list of all known time zones. For example, to see the US time zones, use <strong>ls<\/strong> to list the contents of the <em>zoneinfo<\/em> directory; some items are in subdirectories, such as <code>America<\/code> and <code>US<\/code> time zones:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ls -F \/usr\/share\/zoneinfo\/\nAfrica\/      Cuba     GMT+0        Japan              Pacific\/    tzdata.zi\nAmerica\/     EET      GMT-0        Kwajalein          Poland      UCT\nAntarctica\/  Egypt    GMT0         leapseconds        Portugal    Universal\nArctic\/      Eire     Greenwich    leap-seconds.list  posix\/      US\/\nAsia\/        EST      Hongkong     Libya              posixrules  UTC\nAtlantic\/    EST5EDT  HST          MET                PRC         WET\nAustralia\/   Etc\/     Iceland      Mexico\/            PST8PDT     W-SU\nBrazil\/      Europe\/  Indian\/      MST                right\/      zone1970.tab\nCanada\/      Factory  Iran         MST7MDT            ROC         zone.tab\nCET          GB       iso3166.tab  Navajo             ROK         Zulu\nChile\/       GB-Eire  Israel       NZ                 Singapore\nCST6CDT      GMT      Jamaica      NZ-CHAT            Turkey<\/code><\/pre>\n\n\n\n<p>And just for the US time zones:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ls -F \/usr\/share\/zoneinfo\/US\nAlaska    Arizona  Eastern       Hawaii          Michigan  Pacific\nAleutian  Central  East-Indiana  Indiana-Starke  Mountain  Samoa<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"set-the-time-zone\">Set the time zone<\/h2>\n\n\n\n<p>To set my time zone to use Central time, I just needed to update the <em>\/etc\/localtime<\/em> file to point to the <em>\/usr\/share\/zoneinfo\/US\/Central<\/em> file. I used the <strong>ln<\/strong> command with the <code>-s<\/code> option to create a symbolic link. I also added the <code>-f<\/code> option to &#8220;force&#8221; the removal of the existing <em>\/etc\/localtime<\/em> file at the same time, and the <code>-v<\/code> option so I could see the results of the command.<\/p>\n\n\n\n<p>But I&#8217;m really cautious, so I tested it first by creating a link in the <em>\/tmp<\/em> directory, using my general user account, like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ln -s -f -v \/usr\/share\/zoneinfo\/America\/New_York \/tmp\/z\n'\/tmp\/z' -&gt; '\/usr\/share\/zoneinfo\/America\/New_York'\n\n$ ln -s -f -v \/usr\/share\/zoneinfo\/US\/Central \/tmp\/z\n'\/tmp\/z' -&gt; '\/usr\/share\/zoneinfo\/US\/Central'\n\n$ ln -s -v ..\/usr\/share\/zoneinfo\/US\/Central \/tmp\/z\n'\/tmp\/z' -&gt; '..\/usr\/share\/zoneinfo\/US\/Central'<\/code><\/pre>\n\n\n\n<p>The first command created a link from <em>\/tmp\/z<\/em> for the <code>America\/New_York<\/code> time zone. The <em>\/tmp\/z<\/em> file didn&#8217;t exist yet, so the <strong>ln<\/strong> command created a new file. The second command updated the link to point to the <code>US\/Central<\/code> time zone. You need to use the <code>-f<\/code> option to change an existing link. The third command changed the link to use a path relative to the <em>\/tmp\/z<\/em> file, to point to the same <code>US\/Central<\/code> time zone file. This is the same format that the system normally uses to set the link to the time zone.<\/p>\n\n\n\n<p>That command worked as promised, so now I ran the correct command using <strong>sudo<\/strong> to change the <em>\/etc\/localtime<\/em> file instead:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo ln -s -f -v ..\/usr\/share\/zoneinfo\/US\/Central \/etc\/localtime<\/code><\/pre>\n\n\n\n<p>The new time should be recognized automatically by other apps on the system. If your desktop time doesn&#8217;t update right away, don&#8217;t worry; wait about a minute for your desktop&#8217;s clock app to check the time again, and it should automatically change to the new time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to set the system time zone on Linux<\/p>\n","protected":false},"author":33,"featured_media":3857,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[5,790],"tags":[91,97],"class_list":["post-14147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-sysadmin","tag-linux","tag-sysadmin"],"modified_by":"David Both","_links":{"self":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14147"}],"version-history":[{"count":1,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14147\/revisions"}],"predecessor-version":[{"id":14148,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/posts\/14147\/revisions\/14148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=\/wp\/v2\/media\/3857"}],"wp:attachment":[{"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.both.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}