Received: from xyzzy.lan.internal (cvx-west-206-47-80-67.kingston.net [206.47.80.67]) by postgresql.org (Postfix) with ESMTP id B0890475C91 for ; Wed, 20 Mar 2002 18:41:42 -0500 (EST) Received: from drew by xyzzy.lan.internal with local (Exim 3.35 #1 (Debian)) id 16npQc-0000B4-00; Wed, 20 Mar 2002 18:23:34 -0500 Date: Wed, 20 Mar 2002 18:23:34 -0500 To: Peter Eisentraut Cc: Ken Corey , pgsql-sql@postgresql.org Subject: Re: How do I set the system time on production server? Message-ID: <20020320232334.GA650@xyzzy.dhs.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i From: "Andrew G. Hammond" X-Fnord: +++ath X-WebTV-Stationery: Standard; BGColor=black; TextColor=black X-Message-Flag: Message text blocked: ANTI-MICROSOFT OPINIONS X-BeenThere: drew@xyzzy.dhs.org X-Archive-Number: 200203/268 X-Sequence-Number: 7147 --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 20, 2002 at 12:22:13PM -0500, Peter Eisentraut wrote: > Ken Corey writes: >=20 > > I've just realized that our (production, naturally) database's idea of = the > > current date/time is 24 hours and 14 minutes fast. What a weird thing. > > > > So, is there a way to set the date/time? >=20 > The system time is inherited from the operating system. You can use > date(1) or maybe hwclock(8) to alter the system time. On some systems it > is not recommended to change the system time because that messes up all > kinds of scheduling, so if you can afford it, reboot and change the time > in the BIOS. You should find information in those man pages about the > recommended way to do it on your system. A previous email mentioned ntp. Personally, I'd use the=20 above approach and then maintain the clock with ntpdate.=20=20 This program references and ntp time server and gently=20 syncs your system clock to the one true time. I prefer=20 this to running the ntp daemon propper, since that=20 strikes me as overkill on most systems, and it adds yet=20 another security issue to pay attention to. Stick it as=20 a cron job every couple of hours or so and it'll keep=20 your clock in line. Like all things ntp, you have to=20 set your system clock to GMT, but that shouldn't be a=20 problem unless you're running a braindead OS. Anyway,=20 for a time gap as big as the one you mentioned, there's=20 probably no way to really fix it gently. --=20 Andrew G. Hammond mailto:drew@xyzzy.dhs.org http://xyzzy.dhs.org/~drew/ 56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F 613-389-5481= =20 5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1 "To blow recursion you must first blow recur" -- me --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjyZGfYACgkQCT73CrRXhLEoWACfaD7Ao9RodMcm6BHTwr9XIGJ+ tpEAmgJNNfJHoWpReSX0E1Cz6MYL39Ll =8aOu -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4--