Re: now() time off

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: John McCawley <nospam(at)hardgeus(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: now() time off
Date: 2006-02-23 00:35:55
Message-ID: 20060223003555.GP86022@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 22, 2006 at 04:46:35PM -0600, Scott Marlowe wrote:
> On Wed, 2006-02-22 at 16:36, John McCawley wrote:
> > Earlier this week when I logged into my database, I just so happened to
> > notice that the value for now() was six hours off of the time reported
> > by the operating system when using the date command from the command
> > line. How is this possible? I rebooted the server and the problem
> > magically went away. I am quite certain that I didn't modify anything
> > in the database that should cause this problem. It turns out that that
> > the now() time has been off for some time, and resulted in quite a bit
> > of corrupted data. What exactly should I do in the future to keep this
> > from happening, or where should I look for clues?
>
> Sounds like a time zone issue. I'd start looking there.

I've been bitten by this before as well. I'd be in favor of adding an
option such that postmaster would refuse to start if TZ was something
other than UTC; I'd much rather that then have a bunch of data get
screwed up...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2006-02-23 02:11:55 DBD::Pg 1.44 released
Previous Message Scott Marlowe 2006-02-22 22:46:35 Re: now() time off