{"id":5964,"date":"2021-07-26T23:13:50","date_gmt":"2021-07-26T23:13:50","guid":{"rendered":"https:\/\/swiv.com.br\/updating-oracle-linux-system-date-and-time-from-the-command-line\/"},"modified":"2026-05-27T20:02:30","modified_gmt":"2026-05-27T19:02:30","slug":"updating-oracle-linux-system-date-and-time-from-the-command-line","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/07\/26\/updating-oracle-linux-system-date-and-time-from-the-command-line\/","title":{"rendered":"Updating Oracle Linux System Date and Time from the command line"},"content":{"rendered":"\n<p>Neste artigo simples vamos validar qual \u00e9 o procedimento de atualizarmos o dia e hora do nosso sistema operacional Linux levando em considera\u00e7\u00e3o o time zone desejado.<\/p>\n\n\n\n<p>Validando a configura\u00e7\u00e3o atual do ambiente:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@oel8 ~]# timedatectl\n               Local time: Mon 2021-07-26 20:09:32 -03\n           Universal time: Mon 2021-07-26 23:09:32 UTC\n                 RTC time: Mon 2021-07-26 23:09:31\n                Time zone: America\/Sao_Paulo (-03, -0300)\nSystem clock synchronized: no\n              NTP service: inactive\n          RTC in local TZ: no\n&#x5B;root@oel8 ~]# date\nMon Jul 26 20:09:42 -03 2021\n<\/pre><\/div>\n\n\n<p>Vamos imaginar que queremos alterar as configura\u00e7\u00f5es de data\/hora baseados no time zone da Cidade de Vancouver, Canada. Para isso, conseguimos coletar qual \u00e9 o TZ dispon\u00edvel e reconhecido pelo utilit\u00e1rio timedatectl:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@oel8 ~]# timedatectl list-timezones | grep Vancouver\nAmerica\/Vancouver\n<\/pre><\/div>\n\n\n<p>A partir disso, podemos alterar o ambiente conforme o exemplo abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@oel8 ~]# timedatectl set-timezone America\/Vancouver\n&#x5B;root@oel8 ~]# date\nMon Jul 26 16:12:45 PDT 2021\n<\/pre><\/div>\n\n\n<p>Validando nossa configura\u00e7\u00e3o:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@oel8 ~]# timedatectl\n               Local time: Mon 2021-07-26 16:13:11 PDT\n           Universal time: Mon 2021-07-26 23:13:11 UTC\n                 RTC time: Mon 2021-07-26 23:13:10\n                Time zone: America\/Vancouver (PDT, -0700)\nSystem clock synchronized: no\n              NTP service: inactive\n          RTC in local TZ: no\n<\/pre><\/div>\n\n\n<p>Fonte: https:\/\/docs.oracle.com\/en\/operating-systems\/oracle-linux\/8\/obe-datetime-cli\/#Set-the-system-time-zone<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Neste artigo simples vamos validar qual \u00e9 o procedimento de atualizarmos o dia e hora do nosso sistema operacional Linux levando em considera\u00e7\u00e3o o time zone desejado. Validando a configura\u00e7\u00e3o atual do ambiente: Vamos imaginar que queremos alterar as configura\u00e7\u00f5es de data\/hora baseados no time zone da Cidade de Vancouver, Canada. Para isso, conseguimos coletar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-5964","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=5964"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5964\/revisions"}],"predecessor-version":[{"id":9075,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5964\/revisions\/9075"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}