Обсуждение: SET TIMEZONE doesn't affect to SELECT statement
<p>Hello; by tutorial I have tried the example:<p><br /><p>set timezone to 'Europe/London';<p>select '2008-01-01 12:00:00GMT+2'::timestamptz;<p><br /><p>Result: 2008-01-01 15:00:00<p><br /><p><br /><p>set timezone to 'Europe/Moscow';<p>select'2008-01-01 12:00:00 GMT+2'::timestamptz;<p><br /><p>Result: 2008-01-01 15:00:00<p><br /><p><br/><p>Why is the result identical ? Is something wrong ?<p><br /><p>Thanks for suggestion.
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'
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@centrum.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.