<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: System Time wrong... in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966076#M66258</link>
    <description>The command to test if you are synchronizing the time correctly is:&lt;BR /&gt;&lt;BR /&gt;ntpq -pn&lt;BR /&gt;&lt;BR /&gt;You should see a list like this:&lt;BR /&gt;&lt;BR /&gt;     remote           refid      st t when poll reach   delay   offset  jitter&lt;BR /&gt;==============================================================================&lt;BR /&gt;*10.10.10.10    146.164.48.5     2 u   56   64  377   -0.023  390.197 148.586&lt;BR /&gt;&lt;BR /&gt;The * indicates that that is the server for this node. If you don't see the "*", stop the ntpservice and run:&lt;BR /&gt;&lt;BR /&gt;ntpdate -b ntp.server&lt;BR /&gt;&lt;BR /&gt;And start the service. Also ensure that no firewall is blocking the connection to the ntp server.</description>
    <pubDate>Thu, 09 Mar 2006 17:22:18 GMT</pubDate>
    <dc:creator>Ivan Ferreira</dc:creator>
    <dc:date>2006-03-09T17:22:18Z</dc:date>
    <item>
      <title>System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966075#M66257</link>
      <description>Seems as if two of my FC4 boxes are not updating via NTP as I would expect them to while the other one is working like a champ.&lt;BR /&gt;&lt;BR /&gt;I have checked to verify that the NTP service is running on all of them and it is.&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep ntp | grep -v grep&lt;BR /&gt;ntp 2879 1 0 Feb10 ? 00:00:13 ntpd -u ntp:ntp -p /var/run/ntpd.pid&lt;BR /&gt;&lt;BR /&gt;They all give the same info for the above command (with the PID being different, of course), yet they all seem to be displaying different times.&lt;BR /&gt;&lt;BR /&gt;What am I overlooking?</description>
      <pubDate>Thu, 09 Mar 2006 17:12:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966075#M66257</guid>
      <dc:creator>John Collier</dc:creator>
      <dc:date>2006-03-09T17:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966076#M66258</link>
      <description>The command to test if you are synchronizing the time correctly is:&lt;BR /&gt;&lt;BR /&gt;ntpq -pn&lt;BR /&gt;&lt;BR /&gt;You should see a list like this:&lt;BR /&gt;&lt;BR /&gt;     remote           refid      st t when poll reach   delay   offset  jitter&lt;BR /&gt;==============================================================================&lt;BR /&gt;*10.10.10.10    146.164.48.5     2 u   56   64  377   -0.023  390.197 148.586&lt;BR /&gt;&lt;BR /&gt;The * indicates that that is the server for this node. If you don't see the "*", stop the ntpservice and run:&lt;BR /&gt;&lt;BR /&gt;ntpdate -b ntp.server&lt;BR /&gt;&lt;BR /&gt;And start the service. Also ensure that no firewall is blocking the connection to the ntp server.</description>
      <pubDate>Thu, 09 Mar 2006 17:22:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966076#M66258</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-09T17:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966077#M66259</link>
      <description>Ivan,&lt;BR /&gt;&lt;BR /&gt;All three of them (the one working and the two not) are on the same network going through the same router and using outside, public time servers.&lt;BR /&gt;&lt;BR /&gt;Each of them have several entries when I run the ntpq -pn command:&lt;BR /&gt;&lt;BR /&gt;From the working system:&lt;BR /&gt;&lt;BR /&gt;+80.127.4.179    .PG0A.           1 u  441 1024  377  145.249   -0.761   1.130&lt;BR /&gt;+72.3.133.147    129.6.15.29      2 u  383 1024  377   27.063   -0.238   1.689&lt;BR /&gt;-64.172.230.138  164.67.62.194    2 u   72 1024  377   86.241   11.109  12.325&lt;BR /&gt; 66.187.224.4    .INIT.          16 u    - 1024    0    0.000    0.000 4000.00&lt;BR /&gt;*66.187.224.4    .CDMA.           1 u  403 1024  377   63.016    0.233   1.113&lt;BR /&gt;&lt;BR /&gt;From the first non-working system:&lt;BR /&gt;&lt;BR /&gt;+192.36.143.151  .PPS.            1 u  758 1024  377  186.287  -13.942   7.197&lt;BR /&gt;-24.34.79.42     132.163.4.103    2 u  737 1024  377   88.984    1.932   1.774&lt;BR /&gt;-64.112.189.11   128.10.252.6     2 u  589 1024  377   81.008    2.090   6.420&lt;BR /&gt;+66.187.233.4    .CDMA.           1 u  680 1024  377   52.510   -6.552   4.299&lt;BR /&gt;*66.187.224.4    .CDMA.           1 u  974 1024  375   63.270   -3.971   3.298&lt;BR /&gt;&lt;BR /&gt;And from the last non-working system:&lt;BR /&gt;&lt;BR /&gt;-64.34.193.47    195.137.27.138   3 u  879 1024  377   75.975  -11.893   7.095&lt;BR /&gt;-64.81.84.140    216.52.237.152   3 u  825 1024  377   78.760  -51.992   5.749&lt;BR /&gt;+216.237.126.10  132.239.1.6      2 u  831 1024  377   66.145    0.571   1.970&lt;BR /&gt;+66.187.233.4    .CDMA.           1 u  849 1024  377   71.435   -8.258  14.280&lt;BR /&gt;*66.187.224.4    .CDMA.           1 u   15 1024  377   64.283    0.236   1.794&lt;BR /&gt;&lt;BR /&gt;As you see, all of them have an * next to the same entry, yet they all display different times.  Do I have a "ghost in the machine" thing going on here?</description>
      <pubDate>Thu, 09 Mar 2006 17:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966077#M66259</guid>
      <dc:creator>John Collier</dc:creator>
      <dc:date>2006-03-09T17:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966078#M66260</link>
      <description>Check your timezone configuration. Verify the file /etc/sysconfig/clock. If you do some changes, reboot your computer.&lt;BR /&gt;&lt;BR /&gt;How bad is the time displayed?&lt;BR /&gt;&lt;BR /&gt;What is the ouput of:&lt;BR /&gt;&lt;BR /&gt;date +%z&lt;BR /&gt;date +%Z</description>
      <pubDate>Thu, 09 Mar 2006 17:51:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966078#M66260</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-09T17:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966079#M66261</link>
      <description>Looking at all the /etc/sysconfig/clock files I see that they are all identical:&lt;BR /&gt;&lt;BR /&gt;ZONE="America/North_Dakota/Center"&lt;BR /&gt;UTC=false&lt;BR /&gt;ARC=false&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The one that is correct and one of the others (that is not) both have the same output from the two commands:&lt;BR /&gt;&lt;BR /&gt;date +%z&lt;BR /&gt;-0600&lt;BR /&gt;&lt;BR /&gt;date +%Z&lt;BR /&gt;CST&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The last one displays something slightly different:&lt;BR /&gt;&lt;BR /&gt;date +%z&lt;BR /&gt;+0000&lt;BR /&gt;&lt;BR /&gt;date +%Z&lt;BR /&gt;UTC&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This tells me that the last one is in the wrong time zone (UTC vs CST).  I forget where to change that since it is usually a set-and-forget type thing, but it does not explain why the two that are set the same still display differnt times.&lt;BR /&gt;&lt;BR /&gt;Guess the first thing to do is to find where to change the one to the UTC and then move on from there...</description>
      <pubDate>Thu, 09 Mar 2006 18:09:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966079#M66261</guid>
      <dc:creator>John Collier</dc:creator>
      <dc:date>2006-03-09T18:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966080#M66262</link>
      <description>The time is displayed wrong because there is something bad with your time zone configuration. Your GMT-UTC offset is different, and that's why you get the wrong date. Verify if you have set the TZ environment variable.&lt;BR /&gt;&lt;BR /&gt;echo $TZ</description>
      <pubDate>Fri, 10 Mar 2006 07:10:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966080#M66262</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-10T07:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966081#M66263</link>
      <description>You can also try replacing your current /etc/localtime file with a fresh one:&lt;BR /&gt;&lt;BR /&gt;cp /usr/share/zoneinfo/America/North_Dakota/Center /etc/localtime&lt;BR /&gt;&lt;BR /&gt;This is executed at boot time according to the configuration of /etc/sysconfig/clock</description>
      <pubDate>Fri, 10 Mar 2006 07:44:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966081#M66263</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-10T07:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966082#M66264</link>
      <description>Ivan,&lt;BR /&gt;&lt;BR /&gt;Thanks for the input.  I am at work now, but I will see what I can do with the systems when I get home.&lt;BR /&gt;&lt;BR /&gt;Silly question:&lt;BR /&gt;&lt;BR /&gt;In order to make any of these suggestions work, you have to make these changes as root, right?</description>
      <pubDate>Fri, 10 Mar 2006 12:24:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966082#M66264</guid>
      <dc:creator>John Collier</dc:creator>
      <dc:date>2006-03-10T12:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966083#M66265</link>
      <description>The replacement of the /etc/localtime file you must do as root, but the TZ environment variable is per user configurable. If you want to configure it for all users, add it to /etc/profile:&lt;BR /&gt;&lt;BR /&gt;export TZ="zonename"</description>
      <pubDate>Fri, 10 Mar 2006 12:48:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966083#M66265</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-10T12:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966084#M66266</link>
      <description>Ivan,&lt;BR /&gt;&lt;BR /&gt;It would seem as if I do not have the TZ environment variable set.  When I run the&lt;BR /&gt;&lt;BR /&gt;echo $TZ&lt;BR /&gt;&lt;BR /&gt;I get no response at all.  Just another command prompt.&lt;BR /&gt;&lt;BR /&gt;I did take your advise and copied over a fresh localtime file using the command you suggested.  What got my attention is that it did not complain about overwriting a file when I ran the command as I would have expected.  Now i wish I would have checked the existence of the file prior to running the command.  Oh well.&lt;BR /&gt;&lt;BR /&gt;Now that it is copied over, I have to wait until she is no longer using it to reboot.&lt;BR /&gt;&lt;BR /&gt;Strange thing.  Seems as if the $TZ is not set on any of the boxes, but yet one of them is fine.  I guess I still have a great deal of learning to do in regards to setting system time in Linux.&lt;BR /&gt;&lt;BR /&gt;I will update this thread when there is something more to report.&lt;BR /&gt;&lt;BR /&gt;Thanks for all the help so far!</description>
      <pubDate>Fri, 10 Mar 2006 19:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966084#M66266</guid>
      <dc:creator>John Collier</dc:creator>
      <dc:date>2006-03-10T19:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966085#M66267</link>
      <description>You don't have to reboot the system if you did the cp command. You only need to reboot if you change the /etc/sysconfig/clock file and do not run the cp command.&lt;BR /&gt;&lt;BR /&gt;The TZ variable could not be defined, by default, it's not defined. I just told you to check that just in case.</description>
      <pubDate>Sat, 11 Mar 2006 22:31:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966085#M66267</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-11T22:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: System Time wrong...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966086#M66268</link>
      <description>Time on all boxes now correct.  Thanks for the help!</description>
      <pubDate>Thu, 08 Jun 2006 14:32:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/system-time-wrong/m-p/4966086#M66268</guid>
      <dc:creator>John Collier</dc:creator>
      <dc:date>2006-06-08T14:32:05Z</dc:date>
    </item>
  </channel>
</rss>

