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

Re: BUG #4022: DST Time Zone Bug related to: select now() at time zone 'EST'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Username_PalmTreesNSand" <webdata9(at)comcast(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4022: DST Time Zone Bug related to: select now() at time zone 'EST'
Date: 2008-03-10 14:12:28
Message-ID: 23274.1205158348@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Username_PalmTreesNSand" <webdata9(at)comcast(dot)net> writes:
> I have recently noticed a problem since the Daylight savings time change
> (past 1-2 days).
> The following query returns the time from an hour ago (I'm in EST, but I
> need to be able to handle other time zones):
> 	select now() at time zone 'EST'
> or	select now() at time zone 'CST'

> This query returns the correct time for EST:
> 	select now()

I see no bug here.  We're in daylight saving time now, so the zone is
EDT not EST.  IOW, if it's currently 10:10 EDT, it is also a true
statement that it's 9:10 EST.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Shawn ChasseDate: 2008-03-10 14:53:34
Subject: Rulese Bug: Instead of reporting incorrect insert count.
Previous:From: Bruce MomjianDate: 2008-03-10 14:05:46
Subject: Re: [PATCH] Don't bail with legitimate -N/-B options

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