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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Daylight Savings Time


  • From: Terry Lee Tucker <terry(at)esc1(dot)com>
  • To: pgsql-general(at)postgresql(dot)org
  • Subject: Daylight Savings Time
  • Date: Fri, 21 Apr 2006 16:46:36 -0400
  • Message-id: <200604211646(dot)36835(dot)terry(at)esc1(dot)com>

Hello List:

I need to know if there is a convienient way of establishing whether DST is 
active within a function dealing with adjusting timestamps to other time 
zones. The problem is that if I have the following timestamp:

'04/21/2006 17:05 EDT'

and I use the timezone() function in the following manner:

return (timezone ('CST', '04/21/2006 17:05 EDT')

I get a two hour difference in time. Note that neither of the two arguments 
are hard coded as this example. The "CST" value is stored in the customer 
profile because that is their time zone and the timestamp is generated from 
argeuments passed into the function. 

This is:
rnd=# select version();
                                                   version
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 7.4.6 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 
20030502 (Red Hat Linux 3.2.3-49)

TIA



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group