Skip site navigation (1) Skip section navigation (2)

Re: Server Time Setting

From: "Lane Van Ingen" <lvaningen(at)esncc(dot)com>
To: "Obe, Regina DND\\MIS" <robe(dot)dnd(at)cityofboston(dot)gov>,<pgsql-hackers-win32(at)postgresql(dot)org>
Cc: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Server Time Setting
Date: 2005-09-15 15:16:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
Yes, it reads (GMT-05:00) Eastern Time (US & Canada).

Looks like I may have just solved my own problem: I noticed that in Date and
Time Properties of the Windows clock, on the Time Zone tab, there is a
called  "Automatically adjust clock for daylight savings time changes".

If that box is unchecked, PostgreSQL must try to compensate, because on
platforms that are unchecked is where I am having the problem of now()
a date that is one hour later. It now works correctly.

Thanks for causing me to check this out; it looks like my problem is solved!

-----Original Message-----
From: Obe, Regina DND\MIS [mailto:robe(dot)dnd(at)cityofboston(dot)gov]
Sent: Thursday, September 15, 2005 9:44 AM
To: 'Lane Van Ingen'; 'pgsql-hackers-win32(at)postgresql(dot)org'
Subject: RE: [pgsql-hackers-win32] Server Time Setting

When you say time reads correctly for Windows 2003,  I assume you also mean
not just the time but that the Time Zone tab of windows 2003 Adjust time
reads "Eastern Time (US & Canada)"?

-----Original Message-----
From: Lane Van Ingen [mailto:lvaningen(at)esncc(dot)com]
Sent: Thursday, September 15, 2005 10:13 AM
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: [pgsql-hackers-win32] Server Time Setting

Tom Lane suggested that perhaps this mailing list would be a better place to
ask the following question ... since we have an application that is very
dependent on the accuracy of timestamps, this is a big issue to us.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, September 12, 2005 6:42 PM
To: Lane Van Ingen
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Server Time Setting

"Lane Van Ingen" <lvaningen(at)esncc(dot)com> writes:
>> I am baffled as to why some of the PostgreSQL functions (like now() )
>> are returning a time which is exactly an hour later than the server's
>> actual system time.

> I'd say you've got TimeZone set to something different than you think
>you do.
>			regards, tom lane

Before I asked this question yesterday, I had already checked SHOW ALL and
found only two PostgreSQL config parameters that seemed to apply, and they
appeared to be set properly:
  australian_timezones  = no
  TimeZone              = US/Eastern
We are running 8.0.1, Windows 2003.

Since last message, checked 3 other servers, and found that I have the same
problem on two out of three:
  Server #1: select now() agreed with Windows time on this one
  Server #2: select now() was exactly one hour greater than Windows time
             where config parms were set the same as previous paragraph
  Server #3: select now() was exactly one hour greater than Windows time,
             but config parm was set wrong: TimeZone = Europe/Dublin (don't
             know how that happened; makes you wonder if TimeZone has
             anything to do with this at all!)

Windows 2003 time was set correctly in all four cases.

  - one server displays time correctly
  - two servers APPEAR to be set correctly in Windows, but time displayed
    from now() is one hour greater than Windows time
  - one server is set incorrectly (PostgreSQL TimeZone parameter was set to
    Dublin/Europe); but TimeZone did not appear to have any effect on the
    time being displayed, since now() is displaying time as one hour greater
    than Windows time, and Windows time appears to be set correctly

Being as one server is 'doing it right', there must be some difference in
settings, but so far I have not been able to determine what is different.
Windows appeared to be correct in all cases, but PostgreSQL is not.

---------------------------(end of broadcast)---------------------------

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


In response to


pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2005-09-15 15:51:14
Subject: Re: Server Time Setting
Previous:From: Merlin MoncureDate: 2005-09-15 15:16:20
Subject: Re: Server Time Setting

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group