Re: timezone datetime issue

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Glenn Pierce *EXTERN*" <glennpierce(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: timezone datetime issue
Date: 2014-04-16 11:32:53
Message-ID: A737B7A37273E048B164557ADEF4A58B17CF0FB7@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Glenn Pierce wrote:
> I have a table like
>
> CREATE TABLE sensor_values
> (
> ts timestamp with time zone NOT NULL,
> value double precision NOT NULL DEFAULT 'NaN'::real,
> )
>
> It was intended that ts timestamps would be the time we wanted to store in UTC.
> Clients would adjust their times to UTC before entering into the database.
>
>
> Unfortunately some values have been added with BST times.
> The DB thinks they are UTC times but are an hour out this time of year.
>
> Is the a way to adjust those times ? Ie offset the summer times back an hour ?

The value stored in the database is always the UTC.
So in your case you just have the wrong dates in the database.
What about using UPDATE to change them?

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Theodore 2014-04-16 11:36:31 Re: Heartbleed Impact
Previous Message Boszormenyi Zoltan 2014-04-16 11:27:50 Re: Heartbleed Impact