{"id":226,"date":"2013-07-03T13:16:50","date_gmt":"2013-07-03T13:16:50","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=226"},"modified":"2024-04-22T09:36:30","modified_gmt":"2024-04-22T09:36:30","slug":"date-time-ubuntu-12-04-server","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2013\/07\/date-time-ubuntu-12-04-server\/","title":{"rendered":"Change Date and Time on Ubuntu 24.04 Server"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/time.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-231\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/time.jpg\" alt=\"time\" width=\"465\" height=\"300\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/time.jpg 465w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/07\/time-300x193.jpg 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/a><\/p>\n<p>This simple tutorial is going to show Ubuntu beginners how to display and change date and time on Ubuntu Linux both Server and Desktop.<\/p>\n<p><b>UPDATE: The commands in this tutorial are tested and also works in Ubuntu 24.04.<\/b><\/p>\n<p>To display data and time, use date command:<\/p>\n<pre>date<\/pre>\n<p>Sample output:<\/p>\n<blockquote><p>Wed Jul 3 20:59:28 CST 2013<\/p><\/blockquote>\n<p>To display calendar, use cal command:<\/p>\n<pre>cal<\/pre>\n<p><i>If the command not found, run sudo apt install <code>ncal<\/code> to install it.<\/i><\/p>\n<p>Sample output:<\/p>\n<blockquote><p>July 2013<br \/>\nSu Mo Tu We Th Fr Sa<br \/>\n1 2 3 4 5 6<br \/>\n7 8 9 10 11 12 13<br \/>\n14 15 16 17 18 19 20<br \/>\n21 22 23 24 25 26 27<br \/>\n28 29 30 31<\/p><\/blockquote>\n<p>To change date and time, use command:<\/p>\n<pre>sudo date -s \"4 June 2020 18:00:00\"<\/pre>\n<p>NOTE: your Ubuntu server may enabled network time synchronization. The command above will NOT work until you disable it by using command:<\/p>\n<pre>sudo timedatectl set-ntp no<\/pre>\n<p>To re-enable network time synchronization, run command:<\/p>\n<pre>sudo timedatectl set-ntp yes<\/pre>","protected":false},"excerpt":{"rendered":"<p>This simple tutorial is going to show Ubuntu beginners how to display and change date and time on Ubuntu Linux both Server and Desktop. UPDATE: The commands in this tutorial are tested and also works in Ubuntu 24.04. To display data and time, use date command: date Sample output: Wed Jul 3 20:59:28 CST 2013 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,1],"tags":[291,292,36,206,153],"class_list":["post-226","post","type-post","status-publish","format-standard","hentry","category-command-skills","category-ubuntu-server-2","tag-change","tag-date","tag-date-time","tag-time","tag-ubuntu"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=226"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}