{"id":2937,"date":"2020-12-26T20:00:17","date_gmt":"2020-12-26T20:00:17","guid":{"rendered":"https:\/\/linuxways.net\/?p=2937"},"modified":"2020-12-26T20:00:20","modified_gmt":"2020-12-26T20:00:20","slug":"how-to-change-date-time-and-timezone-in-debian-10","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-change-date-time-and-timezone-in-debian-10\/","title":{"rendered":"How to Change Date, Time, and Timezone in Debian 10"},"content":{"rendered":"<p>It is very essential to have your system configured with the proper date and time. Mostly the Debian OS uses NTP to synchronize time over a network. However, sometimes, you need to manually set the date and time in your system.<\/p>\n<p>In this post, we will show how to change the date, time, and timezone in your Debian system. Debian OS allows you to change your system date, time, and timezone through the following two methods:<\/p>\n<ul>\n<li>Through Command Line<\/li>\n<li>Through GUI<\/li>\n<\/ul>\n<p>Note: Before proceeding, it\u2019s worth mentioning that all the commands and procedures shown in this post have been tested on Debian 10 (Buster).<\/p>\n<h2>Changing the Date, Time, and Timezone through Command Line<\/h2>\n<p>The \u201ctimedatectl\u201d command is used to view and change the current date, time, and timezone of a system. Let\u2019s get started:<\/p>\n<h3>View Current Date, Time, and Timezone<\/h3>\n<p>To view the current date, time, and timezone, you can either use the \u201cdate\u201d or \u201ctimedatectl\u201d command.<\/p>\n<p><strong>Using the \u201cdate\u201d command<\/strong><\/p>\n<p>In order to view the current date, time, and timezone, simply execute the date command in Terminal:<\/p>\n<pre>$ date<\/pre>\n<p>This command shows the day of the week, month name, day of the month, time, timezone name, and year:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"370\" height=\"61\" class=\"wp-image-2938\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-time-and-timezone.png\" alt=\"date, time and timezone\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-time-and-timezone.png 370w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-time-and-timezone-300x49.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n<p><strong>Using the \u201ctimedatectl\u201d command<\/strong><\/p>\n<p>In order to view the current date, time, and timezone, simply execute the timedatectl command in Terminal:<\/p>\n<pre>$ timedatectl<\/pre>\n<p>This command displays the local time as well as the universal and RTC time. It also displays complete information about the timezone.<\/p>\n<p>To find your system&#8217;s current time information, view the first line of output. This line displays the day of the week, date, time, and timezone information.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"571\" height=\"193\" class=\"wp-image-2939\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-time-and-timezone-1.png\" alt=\"date, time and timezone\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-time-and-timezone-1.png 571w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-time-and-timezone-1-300x101.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<p>If you notice in the above screenshot, the NTP service is \u201c<strong>active<\/strong>\u201d. For manually configuring the date, time, and timezone in your Debian system, you will need to turn off the NTP service. Run the following command in Terminal to do so:<\/p>\n<pre>$ timedatectl set-ntp no<\/pre>\n<p>Now again run the timedatectl command to view if the service status has changed to \u201c<strong>inactive<\/strong>\u201d.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"195\" class=\"wp-image-2940\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/timedatectl-command.png\" alt=\"timedatectl command\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/timedatectl-command.png 612w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/timedatectl-command-300x96.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/strong><\/p>\n<h3>Changing the Date<\/h3>\n<p>In order to change the date in the Debian system, run the timedatectl command using the following syntax:<\/p>\n<pre><strong>$ timedatectl set-time YYYY-MM-DD<\/strong><\/pre>\n<p>In the above command,<\/p>\n<ul>\n<li>\u201cYYYY\u201d represents the year<\/li>\n<li>\u201cMM\u201d represents the month (01-12)<\/li>\n<li>\u201cDD\u201d represents (01-31)<\/li>\n<\/ul>\n<p>In order to set the date to let\u2019s say: 2020-12-26 (26<sup>th<\/sup> December 2020), the command would be:<\/p>\n<pre><strong>$ timedatectl set-time 2020-12-26<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"572\" height=\"62\" class=\"wp-image-2941\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/changing-date.png\" alt=\"changing date\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/changing-date.png 572w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/changing-date-300x33.png 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/p>\n<p>Once you have set the date, run the following command to view if it has changed successfully:<\/p>\n<pre>$ timedatectl<\/pre>\n<p>The following output shows the date has been changed to our desired value 2020-12-26. <img loading=\"lazy\" decoding=\"async\" width=\"643\" height=\"196\" class=\"wp-image-2942\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-current-date.png\" alt=\"view current date\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-current-date.png 643w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-current-date-300x91.png 300w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/><\/p>\n<h3>Changing the Time<\/h3>\n<p>In order to change the time in the Debian system, run the timedatectl command using the following syntax:<\/p>\n<pre><strong>$ timedatectl set-time hh-mm-ss<\/strong><\/pre>\n<p>In the above command,<\/p>\n<ul>\n<li>\u201chh\u201d represents hours (00-24)<\/li>\n<li>\u201cmm\u201d represents minutes (00-59)<\/li>\n<li>\u201css\u201d represents seconds (00-59)<\/li>\n<\/ul>\n<p>In order to set the time to let\u2019s say: 18:40 (or 6:40 pm), the command would be:<\/p>\n<pre><strong>$ timedatectl set-time 18:40<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"64\" class=\"wp-image-2943\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-time.png\" alt=\"change time\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-time.png 558w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-time-300x34.png 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/strong><\/p>\n<p>Once you have changed the time, run the following command to view if it has changed successfully:<\/p>\n<pre>$ timedatectl<\/pre>\n<p>The following output shows the time has been changed to our desired value 18:40.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"586\" height=\"194\" class=\"wp-image-2944\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-time.png\" alt=\"view time\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-time.png 586w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-time-300x99.png 300w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/p>\n<h3>Changing the Timezone<\/h3>\n<p>Similar to date and time, the timezone can also be changed using the timedatectl command. Before changing the timezone, you can list available timezones as follows:<\/p>\n<pre>$ <strong>timedatectl list-timezones<\/strong><\/pre>\n<p>This command lists all the available timezones from which you can choose your desired timezone name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"498\" height=\"348\" class=\"wp-image-2945\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/list-timezones.png\" alt=\"list timezones\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/list-timezones.png 498w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/list-timezones-300x210.png 300w\" sizes=\"auto, (max-width: 498px) 100vw, 498px\" \/><\/p>\n<p>In order to change the timezone in the Debian system, run the timedatectl command using the following syntax:<\/p>\n<pre><strong>$ timedatectl set-timezone geographical region\/city<\/strong><\/pre>\n<p>For instance, to change the timezone to <strong>Asia\/Dubai<\/strong>, the command would be:<\/p>\n<pre><strong>$ timedatectl set-timezone <\/strong>Asia\/Dubai<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"612\" height=\"61\" class=\"wp-image-2946\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/word-image-442.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/word-image-442.png 612w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/word-image-442-300x30.png 300w\" sizes=\"auto, (max-width: 612px) 100vw, 612px\" \/><\/p>\n<p>Once you have changed the timezone, run the following command to view if it has changed successfully:<\/p>\n<pre>$ timedatectl<\/pre>\n<p>The following output shows the timezone has been successfully changed to <strong>Asia\/Dubai<\/strong>.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"197\" class=\"wp-image-2947\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-current-timezone.png\" alt=\"view current timezone\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-current-timezone.png 617w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/view-current-timezone-300x96.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/h2>\n<h2>Changing the Date, Time, and Timezone through GUI<\/h2>\n<p>For users who prefer working with GUI, here is how they can change the date, time, and timezone in their Debian system.<\/p>\n<h3>View Current Date, Time, and Timezone<\/h3>\n<p>In order to view the current date, time, and timezone, hit the super key on the keyboard and type <em>date &amp; time<\/em>. Then from the search results, click <strong>Date &amp; Time<\/strong>.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"559\" height=\"188\" class=\"wp-image-2948\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-and-time.png\" alt=\"date and time\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-and-time.png 559w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/date-and-time-300x101.png 300w\" sizes=\"auto, (max-width: 559px) 100vw, 559px\" \/><\/h2>\n<p>It opens the Settings utility in the <strong>Date &amp; Time<\/strong> view. Here you can see your system\u2019s current date, time, and timezone information.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"478\" class=\"wp-image-2949\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/settings-utility.png\" alt=\"Settings utility\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/settings-utility.png 936w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/settings-utility-300x153.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/settings-utility-768x392.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/h2>\n<h3>Changing Date and Time<\/h3>\n<p>For changing the date and time, first, make sure the<strong> Automatic Date &amp; Time<\/strong> switch is turned off. Now in order to change the date and time, click the <strong>Date and Time<\/strong> option as shown in the following screenshot:<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"478\" class=\"wp-image-2950\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/daet-and-time.png\" alt=\"daet and time\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/daet-and-time.png 936w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/daet-and-time-300x153.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/daet-and-time-768x392.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/h2>\n<p>The following <strong>Date &amp; Time<\/strong> window will appear for you to manually choose the date and time. Once you have set the desired date and time, close the window.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"483\" height=\"262\" class=\"wp-image-2951\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/changing-date-and-time.png\" alt=\"changing date and time\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/changing-date-and-time.png 483w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/changing-date-and-time-300x163.png 300w\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" \/><\/h2>\n<p>Using the <strong>Time Format<\/strong> option, you can choose <strong>24-hour<\/strong> or <strong>AM\/PM<\/strong> time format.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"478\" class=\"wp-image-2952\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-tiem-format.png\" alt=\"change tiem format\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-tiem-format.png 936w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-tiem-format-300x153.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-tiem-format-768x392.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/p>\n<h3>Changing Timezone<\/h3>\n<p>For changing the timezone, first, make sure the <strong>Automatic Time Zone<\/strong> switch is turned off. Now in order to change the timezone, click <strong>TimeZone<\/strong> as shown in the following screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"478\" class=\"wp-image-2953\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/timezone.png\" alt=\"timezone\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/timezone.png 936w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/timezone-300x153.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/timezone-768x392.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/p>\n<p>By clicking the <strong>TimeZone<\/strong>, you will see the following window with the map. Choose your location on the map or you can also use the search bar at top to search for your location. Once you do it, your timezone will be changed. After that, close the window.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" width=\"821\" height=\"481\" class=\"wp-image-2954\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-timezone.png\" alt=\"change timezone\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-timezone.png 821w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-timezone-300x176.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2020\/12\/change-timezone-768x450.png 768w\" sizes=\"auto, (max-width: 821px) 100vw, 821px\" \/><\/h2>\n<p>By following the procedures discussed in this post, you can easily change the date, time, and timezone in your Debian system. Based on your convenience, you can either choose the command line or the GUI method. If you are using Ubuntu OS, you can visit our post on <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-change-the-date-time-and-timezone-in-ubuntu-20-04-lts\/\">How to Change the Date, Time, and Timezone in Ubuntu 20.04 LTS<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>It is very essential to have your system configured with the proper date and time. Mostly the Debian OS uses NTP to synchronize time over a network. However,&hellip;<\/p>","protected":false},"author":4,"featured_media":2957,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[111,17,112,113],"class_list":["post-2937","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","tag-date","tag-debian-10","tag-time","tag-timezone"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/2937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=2937"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/2937\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/2957"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=2937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=2937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=2937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}