Re: 8.1.x (tested 8.1.8) timezone bugs

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 8.1.x (tested 8.1.8) timezone bugs
Date: 2007-03-13 17:47:45
Message-ID: 45F6E3C1.2080500@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joshua D. Drake wrote:
> Hello,
>
> When updating for DST we found this nifty problem. This does not happen
> on 8.2.
>

Updated to show timezone:

postgres=# SET TIMEZONE TO 'PST8PDT';
SET
postgres=# select now();
now
-------------------------------
2007-03-13 10:44:33.156381-07
(1 row)

postgres=# SHOW TIMEZONE;
TimeZone
----------
PST8PDT
(1 row)

postgres=# SET TIMEZONE TO PST8PDT;
SET
postgres=# SHOW TIMEZONE;
TimeZone
----------
pst8pdt
(1 row)

postgres=# SELECT NOW();
now
------------------------------
2007-03-13 09:44:33.16286-08
(1 row)

postgres=# set time zone PST8PDT;
SET
postgres=# SHOW time zone;
TimeZone
----------
pst8pdt
(1 row)

postgres=# select now();
now
-------------------------------
2007-03-13 09:44:33.166297-08
(1 row)

postgres=# SET TIME ZONE 'PST8PDT';
SET
postgres=# SHOW TIME ZONE;
TimeZone
----------
PST8PDT
(1 row)

postgres=# select now();
now
-------------------------------
2007-03-13 10:44:38.352985-07
(1 row)

postgres=#

> postgres=# SET TIMEZONE TO 'PST8PDT';
> SET
> postgres=# select now();
> now
> -------------------------------
> 2007-03-13 10:41:07.034754-07
> (1 row)
>
> postgres=# SET TIMEZONE TO PST8PDT;
> SET
> postgres=# SELECT NOW();
> now
> -------------------------------
> 2007-03-13 09:41:07.036069-08
> (1 row)
>
> postgres=# set time zone PST8PDT;
> SET
> postgres=# select now();
> now
> -------------------------------
> 2007-03-13 09:41:07.038045-08
> (1 row)
>
> postgres=# SET TIME ZONE 'PST8PDT';
> SET
> postgres=# select now();
> now
> -------------------------------
> 2007-03-13 10:41:07.039145-07
> (1 row)
>
>
>

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2007-03-13 17:49:57 Re: Daylight Saving Time question PostgreSQL 8.1.4
Previous Message Josh Berkus 2007-03-13 17:43:49 Re: Daylight Saving Time question PostgreSQL 8.1.4