Re: SET TIMEZONE doesn't affect to SELECT statement

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: POST <post(at)centrum(dot)sk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SET TIMEZONE doesn't affect to SELECT statement
Date: 2009-06-18 17:20:49
Message-ID: 7aa638e00906181020w3a0e52bamf053e0f5e115a23e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Strange, maybe there's some server setting because I get different results
on mine..

set timezone to 'Europe/London';
select '2008-01-01 12:00:00 GMT+2'::timestamptz;
Result: '2008-01-01 14:00:00+00'

set timezone to 'Europe/Moscow';
select '2008-01-01 12:00:00 GMT+2'::timestamptz;
Result: '2008-01-01 17:00:00+03'

2009/6/18 POST <post(at)centrum(dot)sk>

> Hello; by tutorial I have tried the example:
>
>
> set timezone to 'Europe/London';
>
> select '2008-01-01 12:00:00 GMT+2'::timestamptz;
>
>
> Result: 2008-01-01 15:00:00
>
>
>
> set timezone to 'Europe/Moscow';
>
> select '2008-01-01 12:00:00 GMT+2'::timestamptz;
>
>
> Result: 2008-01-01 15:00:00
>
>
>
> Why is the result identical ? Is something wrong ?
>
>
> Thanks for suggestion.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2009-06-18 17:49:27 Question re 2 aggregates from 1 query
Previous Message POST 2009-06-18 16:02:06 SET TIMEZONE doesn't affect to SELECT statement