<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3346&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Hwclock issue]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3346</link>
		<description><![CDATA[The most recent posts in Hwclock issue.]]></description>
		<lastBuildDate>Thu, 05 Mar 2020 18:01:16 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20390#p20390</link>
			<description><![CDATA[<p>I stand corrected, and edited my walk-through to reflect this. Thank you, HoaS.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Thu, 05 Mar 2020 18:01:16 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20390#p20390</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20389#p20389</link>
			<description><![CDATA[<div class="quotebox"><cite>GNUser wrote:</cite><blockquote><div><p>localtime (recommended if you dual boot with Windows)</p></div></blockquote></div><p>Use of localtime is never recommended, people who dual-boot with Windows should force Windows to use UTC instead: <a href="https://wiki.archlinux.org/index.php/System_time#UTC_in_Windows" rel="nofollow">https://wiki.archlinux.org/index.php/Sy … in_Windows</a></p><p>@OP: sorry for the diversion.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Thu, 05 Mar 2020 17:55:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20389#p20389</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20385#p20385</link>
			<description><![CDATA[<div class="quotebox"><cite>Eaglet wrote:</cite><blockquote><div><p>You are not careful! I repeat!<br />Must be:</p><p>hwclock --utc<br />2020-02-28 <strong><em>20:15:50</em></strong>.889268+<strong><em>00:00</em></strong></p></div></blockquote></div><p>That&#039;s not correct. The output of the <span class="bbc">hwclock</span> command is your local time, and what comes after the final <strong>+</strong> or <strong>-</strong> is your timezone&#039;s offset from UTC. <em>+00:00</em> would only be correct for users who live in Greenwich <img src="https://dev1galaxy.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Please go over the steps above in my longer post. If you still have questions after that, let me know and I&#039;ll try to help.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Thu, 05 Mar 2020 16:17:58 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20385#p20385</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20384#p20384</link>
			<description><![CDATA[<p>I agree with Eaglet that the way <span class="bbc">hwclock</span> works is a bit confusing. So I decided to get to the bottom of things on my machine. Here&#039;s what I did. I hope it helps...</p><p>First, we have to realize that the hardware clock knows nothing about timezone. It holds a date and a time, that&#039;s it. </p><p>It&#039;s up to the user to tell the operating system the correct timezone and whether the hardware clock is set to UTC (recommended for Unix-like OS) or localtime <span class="bbs">(recommended if you dual boot with Windows)</span>.</p><p>Before I show you the output of some commands, here are some facts:<br />- It&#039;s currently 15:35 UTC<br />- I live in Eastern USA, where timezone is EST (UTC-5)<br />- My local time is 10:35 a.m.</p><p>Okay, now for the commands:</p><div class="codebox"><pre><code>$ sudo hwclock --get --debug | grep &quot;Time read&quot; # this command will show exactly what the hardware clock is saying
Time read from Hardware Clock: 2020/03/05 15:35:32
# Hmmm, hardware clock says it&#039;s 15:35, so it&#039;s obviously set to UTC. Let&#039;s make sure my OS knows that...

$ cat /etc/adjtime
0.000000 1583421556 0.000000
1583421556
UTC
# Notice the third line in the output above. That line tells the OS how to interpret the hardware clock. Mine should say UTC, which it does.

$ cat /etc/timezone
America/New_York

# So hardware clock is set to the correct UTC time, OS knows to interpret hardware clock as UTC, and my timezone is correct. Therefore, when &quot;date&quot; or &quot;hwclock&quot; command puts it all together, it should spit out my correct local time:

$ date
Thu Mar  5 10:35:06 EST 2020 # yep, that&#039;s the correct local time

$ sudo hwclock # or sudo hwclock --utc
2020-03-05 10:35:09.546002-0500 # yep, that&#039;s the correct local time</code></pre></div><p>So as you can see, your OS showing you the correct local time is a complex operation. It requires 3 things: hardware clock being set correctly (to either UTC or local time), your OS knowing whether hardware clock is set to UTC or local time, and your OS knowing your time zone.</p><p>Hope that helps.</p><p>P.S. The <span class="bbc">--utc</span> and <span class="bbc">--localtime</span> flags to <span class="bbc">hwclock</span> are to tell <span class="bbc">hwclock</span> which timescale the hardware clock is set to (<span class="bbc">hwclock</span> assumes UTC, so the <span class="bbc">--utc</span> flag is redundant). Eaglet, If you your hardware clock is set to UTC you should never use the <span class="bbc">--localtime</span> flag because it will give you incorrect (and potentially very confusing) results.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Thu, 05 Mar 2020 15:47:50 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20384#p20384</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20376#p20376</link>
			<description><![CDATA[<p>Stop calling it UTC time. That&#039;s not what it is. It&#039;s local time.</p><p>The very first code block in your first post is correct. The hwclock command is doing exactly what the man page says it does. It&#039;s showing you the local time and your local offset from UTC in both cases.</p><p>One shows the correct local time because you gave the hwclock accurate information, and the other shows the incorrect local time because you gave the hwclock command incorrect information. </p><div class="codebox"><pre><code>hwclock --utc
2020-02-29 02:15:50.889268+03:00
hwclock --localtime
2020-02-28 23:16:54.311448+03:00</code></pre></div><p>You&#039;re welcome to contact the author(s) of hwclock and ask them to change the behavior of the command, but I doubt they&#039;ll change it.</p>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Thu, 05 Mar 2020 00:58:45 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20376#p20376</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20371#p20371</link>
			<description><![CDATA[<div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>@Eaglet,<br />you might want to read <span class="bbc">man hwclock</span> more carefullly, and then pay special attention to the documentation of the <span class="bbc">--show</span> option, which clearly states, in so many words:</p><div class="quotebox"><blockquote><div><p>The time shown is always in local time, even&#160; if&#160; you&#160; keep&#160; your&#160; Hardware&#160; Clock&#160; in&#160; UTC.</p></div></blockquote></div><p>The options <span class="bbc">--utc</span> and <span class="bbc">--localtime</span> are for you to tell about time basis of your clock. The program then presents the clock reading in ISO 8601 format local time with respect to that basis.</p></div></blockquote></div><p>1. UTC time should end at +00:00, not as it is now +xx:00. Local time should end at +/-xx:00.<br />2. I did not change the settings in the BIOS, hwclock itself set the time in UTC in the BIOS. This should not be the case, so that changes are made to the system without the user&#039;s participation.<br />3.&#160; See about ISO 8601 <a href="https://en.wikipedia.org/wiki/ISO_8601#Times" rel="nofollow">https://en.wikipedia.org/wiki/ISO_8601#Times</a><br />4. The above suggests that one of the developers of hwclock got stoned with marijuana.And you repeat the nonsense of a crazy developer hwclock.</p>]]></description>
			<author><![CDATA[dummy@example.com (Eaglet)]]></author>
			<pubDate>Wed, 04 Mar 2020 23:14:45 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20371#p20371</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20304#p20304</link>
			<description><![CDATA[<p>@Eaglet,<br />you might want to read <span class="bbc">man hwclock</span> more carefullly, and then pay special attention to the documentation of the <span class="bbc">--show</span> option, which clearly states, in so many words:</p><div class="quotebox"><blockquote><div><p>The time shown is always in local time, even&#160; if&#160; you&#160; keep&#160; your&#160; Hardware&#160; Clock&#160; in&#160; UTC.</p></div></blockquote></div><p>The options <span class="bbc">--utc</span> and <span class="bbc">--localtime</span> are for you to tell about time basis of your clock. The program then presents the clock reading in ISO 8601 format local time with respect to that basis.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Sun, 01 Mar 2020 20:44:56 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20304#p20304</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20298#p20298</link>
			<description><![CDATA[<p>rolfie, fsmithred!</p><p>You Trolls! Here, trolls, we&#039;re talking about hwclock, not ntp, ntpdate, ntpdate! Write on the topic, and do not clog the discussion with your wet dreams!</p>]]></description>
			<author><![CDATA[dummy@example.com (Eaglet)]]></author>
			<pubDate>Sun, 01 Mar 2020 13:42:24 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20298#p20298</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20297#p20297</link>
			<description><![CDATA[<p>Thanks for confirming, I feel better now since I understand I am not alone. The BIOS is set to Greenwich time, the desktop shows the time what is to expect and complies to my three radio controlled clocks, sync is done via ntp/ntpdate, despite the confusing output everything seems to be working right. </p><p>Have a nice Sunday, rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Sun, 01 Mar 2020 13:28:18 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20297#p20297</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20296#p20296</link>
			<description><![CDATA[<p>rolfie, I got results similar to yours, except I&#039;m the other side of UTC, so mine have &#039;-&#039; instead of &#039;+&#039;. Don&#039;t feel bad about being confused. I&#039;ve been confused by hwclock for years, so I stay away from it. I set it to UTC and use ntp or ntpdate to keep the right time.</p>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Sun, 01 Mar 2020 13:15:58 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20296#p20296</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20291#p20291</link>
			<description><![CDATA[<p>Just for fun I checked with my ASCII PC and on my fileserver running Beowulf. On both identical behaviour. I am confused.</p><p>Mate displays 11:21.</p><div class="codebox"><pre><code>hwclock --utc
2020-03-01 11:21:00.327413+01:00
hwclock --localtime
2020-03-01 10:21:11.155645+01:00
ls -l /etc/localtime
lrwxrwxrwx 1 root root 33 Sep 25 22:48 /etc/localtime -&gt; /usr/share/zoneinfo/Europe/Berlin</code></pre></div><p>I would expect it the other way round. ??? </p><p>rolfie</p>]]></description>
			<author><![CDATA[dummy@example.com (rolfie)]]></author>
			<pubDate>Sun, 01 Mar 2020 11:03:52 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20291#p20291</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20278#p20278</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>How is your Devuan box configured? Is it set to UTC or localtime? If you don&#039;t know then check the last line in /etc/adjtime</p><p>It is recommended to set GNU/Linux systems to UTC, even if dual-booting with Windows. For dual-boot systems you should instead force Windows to use UTC with the RealTimeIsUniversal registry key.</p><p>Use this to check your system timezone:</p><div class="codebox"><pre><code>ls -l /etc/localtime</code></pre></div><p>If it&#039;s wrong then use</p><div class="codebox"><pre><code># dpkg-reconfigure tzdata</code></pre></div></div></blockquote></div><p>Yes! My tzdata is configured. Issue only with hwclock util. I not use MS Windows systems over 10 years!!!</p><p>You are not careful! I repeat!<br />Must be:</p><p>hwclock --utc<br />2020-02-28 <strong><em>20:15:50</em></strong>.889268+<strong><em>00:00</em></strong><br />hwclock --localtime<br />2020-02-28 23:16:54.311448+03:00</p>]]></description>
			<author><![CDATA[dummy@example.com (Eaglet)]]></author>
			<pubDate>Sat, 29 Feb 2020 20:51:24 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20278#p20278</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20276#p20276</link>
			<description><![CDATA[<p>How is your Devuan box configured? Is it set to UTC or localtime? If you don&#039;t know then check the last line in /etc/adjtime</p><p>It is recommended to set GNU/Linux systems to UTC, even if dual-booting with Windows. For dual-boot systems you should instead force Windows to use UTC with the RealTimeIsUniversal registry key.</p><p>Use this to check your system timezone:</p><div class="codebox"><pre><code>ls -l /etc/localtime</code></pre></div><p>If it&#039;s wrong then use</p><div class="codebox"><pre><code># dpkg-reconfigure tzdata</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 29 Feb 2020 20:11:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20276#p20276</guid>
		</item>
		<item>
			<title><![CDATA[Hwclock issue]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20265#p20265</link>
			<description><![CDATA[<p>Hello, friends!</p><p>I have the following situation in Devuan 2 and Devuan 3:</p><div class="codebox"><pre><code>hwclock --utc
2020-02-29 02:15:50.889268+03:00
hwclock --localtime
2020-02-28 23:16:54.311448+03:00</code></pre></div><p><strong>This is wrong!!!</strong><br />Must be:</p><div class="codebox"><pre><code>hwclock --utc
2020-02-28 20:15:50.889268+00:00
hwclock --localtime
2020-02-28 23:16:54.311448+03:00</code></pre></div><p>After a reboot, the BIOS sets the time to UTC, which should be localtime.</p><p><strong>Please report this issue to the hwclock developers.</strong></p><p>Thanks!</p>]]></description>
			<author><![CDATA[dummy@example.com (Eaglet)]]></author>
			<pubDate>Fri, 28 Feb 2020 20:43:59 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20265#p20265</guid>
		</item>
	</channel>
</rss>
