<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;윈도우와 리눅스를 듀얼부팅하는 환경에서 아래와 같이 시간이 지속적으로 바뀌는 문제를 발견했다. 윈도우에서 시간을 알맞게 세팅하고 다시 리눅스로 들어오면 리눅스의 시간이 늦어져 있고, 리눅스에서 시간을 맞추면 윈도우에서 시간이 빨라져 있었다. 그래서 이러한 이슈를 검색해 보고 해결한 결과를 포스팅하려고 한다.</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<figure class="imageblock alignCenter" data-filename="debian.png" style="margin: 0px auto 20px; max-width: 100%; clear: both; display: table; position: relative; text-align: center; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff; width: auto !important; height: auto !important;"><span data-url="https://blog.kakaocdn.net/dn/X7ahH/btqyOUMllGB/YI89eoMKPfKKrc5pseT6xk/img.png" data-lightbox="lightbox" data-alt="1. 데비안에서 시간" style="cursor: pointer;"><img src="https://blog.kakaocdn.net/dn/X7ahH/btqyOUMllGB/YI89eoMKPfKKrc5pseT6xk/img.png" srcset="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FX7ahH%2FbtqyOUMllGB%2FYI89eoMKPfKKrc5pseT6xk%2Fimg.png" data-filename="debian.png" style="border: 0px none; max-width: 100%; display: inline-block; width: 399px; margin: 0px; height: auto;" /></span>
   <figcaption style="font-size: 13px; word-break: break-word; padding-top: 10px; min-height: 20px; caption-side: bottom;">1. 데비안에서 시간</figcaption>
   </figure>
<figure class="imageblock alignCenter" data-filename="windows.png" style="margin: 0px auto 20px; max-width: 100%; clear: both; display: table; position: relative; text-align: center; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff; width: auto !important; height: auto !important;"><span data-url="https://blog.kakaocdn.net/dn/SALEN/btqyLeMjLv6/wjMJaiedj9yY3SRGt4kNYK/img.png" data-lightbox="lightbox" data-alt="2. 윈도우에서 시간" style="cursor: pointer;"><img src="https://blog.kakaocdn.net/dn/SALEN/btqyLeMjLv6/wjMJaiedj9yY3SRGt4kNYK/img.png" srcset="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FSALEN%2FbtqyLeMjLv6%2FwjMJaiedj9yY3SRGt4kNYK%2Fimg.png" data-filename="windows.png" style="border: 0px none; max-width: 100%; display: inline-block; width: 395px; margin: 0px; height: auto;" /></span>
   <figcaption style="font-size: 13px; word-break: break-word; padding-top: 10px; min-height: 20px; caption-side: bottom;">2. 윈도우에서 시간</figcaption>
   </figure>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<h2 data-ke-size="size26" style="font-size: 26px; margin: 52px auto 28px; padding: 0px; outline: none; line-height: 30px; font-weight: normal; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff;">문제가 발생하는 이유</h2>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;"><span style="color: #333333;">&nbsp;이는 윈도우와 데비안(리눅스)의 시간설정 방식의 차이에서 발생하는 문제이다.</span>&nbsp;<span style="color: #ee2323;"><b>윈도우에서는 메인보드에 저장된 시간을 기본값으로 설정</b></span>하는 반면,&nbsp;<span style="color: #ee2323;"><b>리눅스에서는 GMT(</b></span><span style="color: #ee2323;"><b>Greenwich Mean Time)를 기준으로 메인보드의 시간과 현재 위치의 시차를 적용하여 시간을 설정</b></span>하기 때문에 다르게 된다.</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;예를 들어 메인보드의 시간이 오전1시라고 했을 때, 윈도우는 이를 그대로 가져와서 오전1시로 표시하는 반면, 리눅스에서는 GMT기준 한국의 시간은&nbsp;GMT+9여서&nbsp;메인보드의 시간에 9시간을 더해서 오전10시로 표시하는 것이다.</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;쉽게 말해서,&nbsp;<span style="color: #ee2323;"><b>같은 메인보드의 시간을 사용하는 두 개의 운영체제가 다른 시간설정 방식을 가지고 있어서 발생</b></span>하는 것이다.</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<h2 data-ke-size="size26" style="font-size: 26px; margin: 52px auto 28px; padding: 0px; outline: none; line-height: 30px; font-weight: normal; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff;">해결방법</h2>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;따라서 이는 윈도우의 시간 설정 방식을 리눅스의 방식으로 바꾸거나, 리눅스의 시간 설정 방식을 윈도우로 바꿔서 쉽게 해결할 수 있다.</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;아래 참고 사이트에 가서 보면 알 수 있듯이 윈도우의 시간 설정 방식을 바꾸는 것은 레지스트리를 수정하는 작업이므로, 비교적으로 손쉬운 리눅스의 시간 설정 방식을 메인보드의 시간을 기준으로 표시하도록 바꾸는 방법을 알아보도록 하자.</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;터미널을 실행시키고 아주 간단하게 다음 명령어를 입력해보자.</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<pre class="dsconfig" style="overflow: auto; margin: 28px auto; padding: 16px; outline: none; background-color: #f6f7f8; overflow-wrap: break-word; font-family: Menlo, Consolas, Monaco, monospace; font-size: 14px; line-height: 20px; color: #666666;">
   <code class="hljs sql" style="margin: 0px; padding: 0.5em; outline: none; display: block; overflow-x: auto; color: #333333; background: rgb(248, 248, 248);">timedatectl <span class="hljs-keyword" style="font-weight: bold;">set</span>-<span class="hljs-keyword" style="font-weight: bold;">local</span>-rtc <span class="hljs-number" style="color: #008080;">1</span><span class="hljs-comment" style="color: #999988; font-style: italic;">--adjust-system-clock</span></code>
   </pre>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<figure class="imageblock alignCenter" data-filename="change_timesetting.png" style="margin: 0px auto 20px; max-width: 100%; clear: both; display: table; position: relative; text-align: center; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; font-size: 14px; background-color: #ffffff; width: auto !important; height: auto !important;"><span data-url="https://blog.kakaocdn.net/dn/OIQ7n/btqyK9j7vbf/6KwwiQrqLAfclCPLjSz1e1/img.png" data-lightbox="lightbox" data-alt="3. 명령어 입력" style="cursor: pointer;"><img src="https://blog.kakaocdn.net/dn/OIQ7n/btqyK9j7vbf/6KwwiQrqLAfclCPLjSz1e1/img.png" srcset="https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FOIQ7n%2FbtqyK9j7vbf%2F6KwwiQrqLAfclCPLjSz1e1%2Fimg.png" data-filename="change_timesetting.png" style="border: 0px none; max-width: 100%; display: inline-block; width: 654px; margin: 0px; height: auto;" /></span>
   <figcaption style="font-size: 13px; word-break: break-word; padding-top: 10px; min-height: 20px; caption-side: bottom;">3. 명령어 입력</figcaption>
   </figure>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;</p>
<p style="margin-right: auto; margin-bottom: 28px; margin-left: auto; padding-right: 0px; padding-left: 0px; outline: none; font-size: 16px; line-height: 28px; color: #666666; font-family: &quot;Noto Sans&quot;, sans-serif; background-color: #ffffff; padding-top: 0px !important; padding-bottom: 0px !important;">&nbsp;위 명령어를 실행시키면 리눅스의 시간 설정 방식은 메인모드의 시간에 의존하게 되어 윈도우와 시간차이가 사라지게 된다.</p>