Re: [GENERAL] Postgres and timezones

2016-01-21 Thread Adrian Klaver
On 01/21/2016 02:58 AM, Steve Rogerson wrote: On 20/01/16 19:19, Vik Fearing wrote: On 01/20/2016 04:24 PM, Steve Rogerson wrote: Postgres doesn't store original TZ. It does recalculation to local TZ. If you need original TZ, you have to store it separetely. I know and that's what I'm trying

Re: [GENERAL] Postgres and timezones

2016-01-21 Thread Steve Rogerson
On 20/01/16 19:19, Vik Fearing wrote: > On 01/20/2016 04:24 PM, Steve Rogerson wrote: >>> Postgres doesn't store original TZ. It does recalculation to local TZ. If >>> you >>> need original TZ, you have to store it separetely. >>> >> >> I know and that's what I'm trying to deal with. Given I know

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Vik Fearing
On 01/20/2016 04:24 PM, Steve Rogerson wrote: >> Postgres doesn't store original TZ. It does recalculation to local TZ. If you >> need original TZ, you have to store it separetely. >> > > I know and that's what I'm trying to deal with. Given I know the origin TZ - > as in Europe/Lisbon I'm trying

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Steve Rogerson
On 20/01/16 15:38, Steve Crawford wrote: > Is this of any use? > > select * from pg_timezone_names where name = 'Europe/Lisbon'; > name | abbrev | utc_offset | is_dst > ---+++ > Europe/Lisbon | WET| 00:00:00 | f > A bit - but what's missing

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Steve Crawford
Right, I was just mentioning the existence of that built-in data in case it was of use to the OP. But I should have also mentioned some caveats in case it is important to his use-case: 1. Full names are not as standardized as one might like so there are multiple possible full names for a time zone

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Pavel Stehule
Hi 2016-01-20 16:24 GMT+01:00 Steve Rogerson : > On 20/01/16 13:27, Pavel Stehule wrote: > > > > > > > > Postgres doesn't store original TZ. It does recalculation to local TZ. > If you > > need original TZ, you have to store it separetely. > > > > I know and that's what I'm trying to deal with. G

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Pavel Stehule
2016-01-20 16:38 GMT+01:00 Steve Crawford : > Is this of any use? > > select * from pg_timezone_names where name = 'Europe/Lisbon'; > name | abbrev | utc_offset | is_dst > ---+++ > Europe/Lisbon | WET| 00:00:00 | f > > This is list of know tim

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Steve Crawford
Is this of any use? select * from pg_timezone_names where name = 'Europe/Lisbon'; name | abbrev | utc_offset | is_dst ---+++ Europe/Lisbon | WET| 00:00:00 | f -Steve On Wed, Jan 20, 2016 at 7:24 AM, Steve Rogerson wrote: > On 20/01/16 13:2

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Steve Rogerson
On 20/01/16 13:27, Pavel Stehule wrote: > > > > Postgres doesn't store original TZ. It does recalculation to local TZ. If you > need original TZ, you have to store it separetely. > I know and that's what I'm trying to deal with. Given I know the origin TZ - as in Europe/Lisbon I'm trying to de

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Eelke Klein
2016-01-20 12:10 GMT+01:00 Steve Rogerson : > Hi, this is wrong: > > # select to_char('2016-01-20 00:00'::timestamp at time zone > 'Europe/Lisbon', > 'TZ'); > to_char > - > GMT > (1 row) > > > It should be WET, "Western European Time". Is there something I'm doing > wrong? > > Actually y

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Pavel Stehule
2016-01-20 14:24 GMT+01:00 Steve Rogerson : > On 20/01/16 12:53, Albe Laurenz wrote: > > Steve Rogerson wrote: > >> Hi, this is wrong: > >> > >> # select to_char('2016-01-20 00:00'::timestamp at time zone > 'Europe/Lisbon', > >> 'TZ'); > >> to_char > >> - > >> GMT > >> (1 row) > >> > >>

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Steve Rogerson
On 20/01/16 12:53, Albe Laurenz wrote: > Steve Rogerson wrote: >> Hi, this is wrong: >> >> # select to_char('2016-01-20 00:00'::timestamp at time zone 'Europe/Lisbon', >> 'TZ'); >> to_char >> - >> GMT >> (1 row) >> >> >> It should be WET, "Western European Time". Is there something I'm do

Re: [GENERAL] Postgres and timezones

2016-01-20 Thread Albe Laurenz
Steve Rogerson wrote: > Hi, this is wrong: > > # select to_char('2016-01-20 00:00'::timestamp at time zone 'Europe/Lisbon', > 'TZ'); > to_char > - > GMT > (1 row) > > > It should be WET, "Western European Time". Is there something I'm doing wrong? That query will always give you your

[GENERAL] Postgres and timezones

2016-01-20 Thread Steve Rogerson
Hi, this is wrong: # select to_char('2016-01-20 00:00'::timestamp at time zone 'Europe/Lisbon', 'TZ'); to_char - GMT (1 row) It should be WET, "Western European Time". Is there something I'm doing wrong? Steve -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) T