pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik.fearing@dalibo.com>
To: miaoyimin@huawei.com
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #9265: why the same interval can't get the same timestamp?
Date: Tue, 18 Feb 2014 15:24:24 +0100
Message-ID: <53036D18.60806@dalibo.com> (raw)
In-Reply-To: <20140218120621.24620.15178@wrigleys.postgresql.org>
References: <20140218120621.24620.15178@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 02/18/2014 01:06 PM, miaoyimin@huawei.com wrote:
> The following bug has been logged on the website:
>
> Bug reference:      9265
> Logged by:          yimin
> Email address:      miaoyimin@huawei.com
> PostgreSQL version: 9.2.6
> Operating system:   suse 10.3
> Description:        
>
> postgres=# select ('epoch'::pg_catalog.timestamptz + 1386201600 * '1
> second'::pg_catalog.interval);
>         ?column?
> ------------------------
>  2013-12-05 08:00:00+08
> (1 row)
>
> postgres=# select ('epoch'::pg_catalog.timestamptz + 16044 * '1
> day'::pg_catalog.interval);
>         ?column?
> ------------------------
>  2013-12-05 07:30:00+08
> (1 row)
>
> postgres=# show timezone;
>      TimeZone
> -------------------
>  Asia/Kuala_Lumpur
> (1 row)
>
>


The timezone changed by thirty minutes on December 31, 1981 so the
number of days since epoch is not the same as the number of seconds.

-- 
Vik



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)  latest in thread

Message-ID: <53036D18.60806@dalibo.com>
Permalink:  ../53036D18.60806@dalibo.com/
Also on:    postgresql.org/message-id/53036D18.60806@dalibo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: vik.fearing@dalibo.com, miaoyimin@huawei.com
  Subject: Re: BUG #9265: why the same interval can't get the same timestamp?
  In-Reply-To: <53036D18.60806@dalibo.com>
  References: <20140218120621.24620.15178@wrigleys.postgresql.org> <53036D18.60806@dalibo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox