{"id":4441,"date":"2022-12-20T17:49:18","date_gmt":"2022-12-20T20:49:18","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/org-freedesktop-timedate1-man5\/"},"modified":"2022-12-20T17:49:18","modified_gmt":"2022-12-20T20:49:18","slug":"org-freedesktop-timedate1-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/org-freedesktop-timedate1-man5\/","title":{"rendered":"ORG.FREEDESKTOP.TIMEDATE1 (man5)"},"content":{"rendered":"<h1 align=\"center\">ORG.FREEDESKTOP.TIMEDATE1<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#INTRODUCTION\">INTRODUCTION<\/a><br \/> <a href=\"#THE D\u2212BUS API\">THE D\u2212BUS API<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#VERSIONING\">VERSIONING<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">org.freedesktop.timedate1 \u2212 The D\u2212Bus interface of systemd\u2212timedated<\/p>\n<h2>INTRODUCTION <a name=\"INTRODUCTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd-timedated.service<\/b>(8) is a system service that can be used to control the system time and related settings. This page describes the D\u2212Bus interface.<\/p>\n<h2>THE D\u2212BUS API <a name=\"THE D\u2212BUS API\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The service exposes the following interfaces on the bus:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">node \/org\/freedesktop\/timedate1 { <br \/> interface org.freedesktop.timedate1 { <br \/> methods: <br \/> SetTime(in x usec_utc, <br \/> in b relative, <br \/> in b interactive); <br \/> SetTimezone(in s timezone, <br \/> in b interactive); <br \/> SetLocalRTC(in b local_rtc, <br \/> in b fix_system, <br \/> in b interactive); <br \/> SetNTP(in b use_ntp, <br \/> in b interactive); <br \/> ListTimezones(out as timezones); <br \/> properties: <br \/> readonly s Timezone = &#8216;&#8230;&#8217;; <br \/> readonly b LocalRTC = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b CanNTP = &#8230;; <br \/> readonly b NTP = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b NTPSynchronized = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly t TimeUSec = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly t RTCTimeUSec = &#8230;; <br \/> }; <br \/> interface org.freedesktop.DBus.Peer { &#8230; }; <br \/> interface org.freedesktop.DBus.Introspectable { &#8230; }; <br \/> interface org.freedesktop.DBus.Properties { &#8230; }; <br \/> };<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Methods<\/b> <br \/> Use <b>SetTime()<\/b> to change the system clock. Pass a value of microseconds since the UNIX epoch (1 Jan 1970 UTC). If <i>relative<\/i> is true, the passed usec value will be added to the current system time. If it is false, the current system time will be set to the passed usec value. If the system time is set with this method, the RTC will be updated as well.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Use <b>SetTimezone()<\/b> to set the system timezone. Pass a value like &#8220;Europe\/Berlin&#8221; to set the timezone. Valid timezones are listed in \/usr\/share\/zoneinfo\/zone.tab. If the RTC is configured to be maintained in local time, it will be updated accordingly.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Use <b>SetLocalRTC()<\/b> to control whether the RTC is in local time or UTC. It is strongly recommended to maintain the RTC in UTC. However, some OSes (Windows) maintain the RTC in local time, which might make it necessary to enable this feature. Note that this might create various problems as daylight changes could be missed. If <i>fix_system<\/i> is &#8220;true&#8221;, the time from the RTC is read again and the system clock is adjusted according to the new setting. If <i>fix_system<\/i> is &#8220;false&#8221;, the system time is written to the RTC taking the new setting into account. Use <i>fix_system=true<\/i> in installers and livecds where the RTC is probably more reliable than the system time. Use <i>fix_system=false<\/i> in configuration UIs that are run during normal operation and where the system clock is probably more reliable than the RTC.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Use <b>SetNTP()<\/b> to control whether the system clock is synchronized with the network using systemd\u2212timesyncd. This will enable and start or disable and stop the chosen time synchronization service.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ListTimezones()<\/b> returns a list of time zones known on the local system as an array of names (&#8220;[&#8220;Africa\/Abidjan&#8221;, &#8220;Africa\/Accra&#8221;, &#8230;, &#8220;UTC&#8221;]&#8221;).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Properties<\/b> <i><br \/> Timezone<\/i> shows the currently configured time zone. <i>LocalRTC<\/i> shows whether the RTC is configured to use UTC (false), or the local time zone (true). <i>CanNTP<\/i> shows whether a service to perform time synchronization over the network is available, and <i>NTP<\/i> shows whether such a service is enabled.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>NTPSynchronized<\/i> shows whether the kernel reports the time as synchronized (c.f. <b>adjtimex<\/b>(3)). <i>TimeUSec<\/i> and <i>RTCTimeUSec<\/i> show the current time on the system and in the RTC. The purpose of those three properties is to allow remote clients to access this information over D\u2212Bus. Local clients can access the information directly.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Whenever the <i>Timezone<\/i> and <i>LocalRTC<\/i> settings are changed via the daemon, <b>PropertyChanged<\/b> signals are sent out to which clients can subscribe.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note that this service will not inform you about system time changes. Use <b>timerfd<\/b>(3) with <b>CLOCK_REALTIME<\/b> and <b>TFD_TIMER_CANCEL_ON_SET<\/b> for that.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Security<\/b> <br \/> The <i>interactive<\/i> boolean parameters can be used to control whether <b><font color=\"#0000FF\">polkit<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">should interactively ask the user for authentication credentials if required.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The polkit action for <b>SetTimezone()<\/b> is org.freedesktop.timedate1.set\u2212timezone. For <b>SetLocalRTC()<\/b> it is org.freedesktop.timedate1.set\u2212local\u2212rtc, for <b>SetTime()<\/b> it is org.freedesktop.timedate1.set\u2212time and for <b>SetNTP()<\/b> it is org.freedesktop.timedate1.set\u2212ntp. <b>ListTimezones()<\/b> does not require any privileges.<\/font><\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Example\u00a01.\u00a0Introspect org.freedesktop.timedate1 on the bus<\/b><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">$ gdbus introspect \u2212\u2212system  <br \/> \u2212\u2212dest org.freedesktop.timedate1  <br \/> \u2212\u2212object\u2212path \/org\/freedesktop\/timedate1<\/font><\/p>\n<h2>VERSIONING <a name=\"VERSIONING\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">These D\u2212Bus interfaces follow<\/font> <b><font color=\"#0000FF\">the usual interface versioning guidelines<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b><font color=\"#0000FF\">More information on how the system clock and RTC interact<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">polkit<\/font><\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/software\/polkit\/docs\/latest\/<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"63%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">the usual interface versioning guidelines<\/font><\/p>\n<\/td>\n<td width=\"20%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">http:\/\/0pointer.de\/blog\/projects\/versioning-dbus.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"83%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">More information on how the system clock and RTC interact<\/font><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/lists.freedesktop.org\/archives\/systemd-devel\/2011-May\/002526.html<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  org.freedesktop.timedate1 \u2212 The D\u2212Bus interface of systemd\u2212timedated <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1318],"class_list":["post-4441","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-org"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4441"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4441\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}