Thread: convert timezone to string ...
I know that the server knows that ADT == -0400, and AST == -0300 ... is there any way of reversing that? Basically, I want to say: SELECT timezone_str(-0400, 'not dst'); and have it return ADT ... I've got a method of doing it right now, using a function, but just find it looks so messy, just wondering if there is a clean way of doing it ... Thanks ...
> I know that the server knows that ADT == -0400, and AST == > -0300 ... is there any way of reversing that? Basically, I > want to say: > > SELECT timezone_str(-0400, 'not dst'); > > and have it return ADT ... I've got a method of doing it > right now, using a function, but just find it looks so messy, > just wondering if there is a clean way of doing it ... > > Thanks ... How would you know *which* timezone to go back to? For every hourly offset there is a whole set of timezones that would result in it... //Magnus
"Marc G. Fournier" <scrappy@postgresql.org> writes: > I know that the server knows that ADT == -0400, and AST == -0300 ... Other way around isn't it? Unless Canada observes a pretty strange variety of daylight saving time ;-) regards, tom lane
On Tue, 25 Oct 2005, Tom Lane wrote: > "Marc G. Fournier" <scrappy@postgresql.org> writes: >> I know that the server knows that ADT == -0400, and AST == -0300 ... > > Other way around isn't it? Unless Canada observes a pretty strange > variety of daylight saving time ;-) I knew I was going to get that backwards :( ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664