Re: Time slowly goes out of sync Cygwin+windows+psotgres - Mailing list pgsql-admin

From Tom Lane
Subject Re: Time slowly goes out of sync Cygwin+windows+psotgres
Date
Msg-id 26510.1030630474@sss.pgh.pa.us
Whole thread Raw
In response to Time slowly goes out of sync Cygwin+windows+psotgres  (Aaron <aarmel@netagi.com>)
Responses Re: Time slowly goes out of sync  ("Chad R. Larson" <chad@eldocomp.com>)
List pgsql-admin
Aaron <aarmel@netagi.com> writes:
> Is postgres calculateing the time itself or reading of the machines clock?

Postgres just asks the OS what time it is.  I think you have an
off-speed system clock crystal (lots of PC-grade hardware will
gain or lose 10 minutes/month :-().

I don't know what test you are using to convince yourself that the OS
time is correct when Postgres' time is different --- but I'll bet lunch
you made a mistake.

One other thing to watch for is that "SELECT now()" returns the time as
of the start of the current transaction.  If you said "begin" and then
waited ten minutes you could get a 10-minute discrepancy.  I doubt you
did that, but it's something to be aware of.

            regards, tom lane

pgsql-admin by date:

Previous
From: "Mark McEahern"
Date:
Subject: Re: programatically obtaining table layout
Next
From: Tom Lane
Date:
Subject: Re: Createlang problem.