From: Andrew G. Hammond <drew@xyzzy.dhs.org>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Ken Corey <ken.corey@atomic-interactive.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How do I set the system time on production server?
Date: Wed, 20 Mar 2002 18:23:34 -0500
Message-ID: <20020320232334.GA650@xyzzy.dhs.org> (raw)
In-Reply-To: <Pine.LNX.4.30.0203201218330.812-100000@peter.localdomain>
References: <E16lvXk-0006mI-00@arrows.timewarp.co.uk>
<Pine.LNX.4.30.0203201218330.812-100000@peter.localdomain>
On Wed, Mar 20, 2002 at 12:22:13PM -0500, Peter Eisentraut wrote:
> Ken Corey writes:
>
> > 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?
>
> 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
above approach and then maintain the clock with ntpdate.
This program references and ntp time server and gently
syncs your system clock to the one true time. I prefer
this to running the ntp daemon propper, since that
strikes me as overkill on most systems, and it adds yet
another security issue to pay attention to. Stick it as
a cron job every couple of hours or so and it'll keep
your clock in line. Like all things ntp, you have to
set your system clock to GMT, but that shouldn't be a
problem unless you're running a braindead OS. Anyway,
for a time gap as big as the one you mentioned, there's
probably no way to really fix it gently.
--
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
5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1
"To blow recursion you must first blow recur" -- me
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: drew@xyzzy.dhs.org, peter_e@gmx.net, ken.corey@atomic-interactive.com
Subject: Re: How do I set the system time on production server?
In-Reply-To: <20020320232334.GA650@xyzzy.dhs.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox