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

Re: Timestamp with time zone

From: Tim Landscheidt <tim(at)tim-landscheidt(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Timestamp with time zone
Date: 2010-06-30 16:49:11
Message-ID: m38w5wcvp4.fsf@passepartout.tim-landscheidt.de (view raw or flat)
Thread:
Lists: pgsql-novice
Michael Glaesemann <grzm(at)seespotcode(dot)net> wrote:

>>  IMVHO best practice is to treat TIMESTAMP WITH TIME ZONE
>> as truly evil (TM),

> Um, why?

Because its in- and output depend on:

- The time zone set in the server's OS configuration,
- the time zone set in the server's PostgreSQL configura-
  tion,
- the time zone set in the user's configuration,
- a possible "SET SESSION" command,
- a possible "SET LOCAL" command and
- a possible "AT TIME ZONE" construct.

Add to that the possibility that the zoneinfo data might
differ from server to server and over time.

  So unless you are /very/ certain that all servers, all us-
ers and all clients will use the same settings always and
forever, especially if clients exchange data outside the da-
tabase, I'd recommend avoiding "WITH TIME ZONE" whenever
possible.

Tim


In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2010-06-30 16:55:59
Subject: Re: Compiling under MSYS and Windows 7
Previous:From: Xavier RobinDate: 2010-06-30 14:50:39
Subject: Re: Timestamp with time zone

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