public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jayadevan M <[email protected]>
To: David G. Johnston <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Doubt on pg_timezone_names and pg_timezone_abbrevs
Date: Tue, 1 Apr 2025 12:02:43 +0530
Message-ID: <CAFS1N4hHnECpW6Rn7ZvuY9NXQp1uViJvAczBtzqE2pVPey9Enw@mail.gmail.com> (raw)
In-Reply-To: <CAKFQuwawH6KnKLEU+h=vcsBE5UFkZ+S1sLp_tk6aVDPg3G5XoQ@mail.gmail.com>
References: <CAFS1N4go0PyXzR=krVN1EqdBx+T_Wv+P736KxDyZ8ZGuCfi8Rw@mail.gmail.com>
	<CAKFQuwawH6KnKLEU+h=vcsBE5UFkZ+S1sLp_tk6aVDPg3G5XoQ@mail.gmail.com>

On Tue, Apr 1, 2025 at 9:28 AM David G. Johnston <[email protected]>
wrote:

> On Mon, Mar 31, 2025 at 8:39 PM Jayadevan M <[email protected]>
> wrote:
>
>> Hello PG members,
>> I used 'IST'  in a query like this - * (timestamp_hour) at time zone
>> 'IST' time_ist *and did not get the expected output - timestamp in
>> Indian Standard Time. So I queried the 2 views that provide timezone info
>> and did not really understand the abbrev column.
>> select name, abbrev, utc_offset  from pg_timezone_names  where abbrev =
>> 'IST'  ;
>>
>
> Since the S and T are non-location specific you get 26 different timezone
> abbreviations to choose from. That wasn't enough for the world.  So IST is
> non-unique; and for historical reasons Ireland (Eire, which contains
> Dublin) is given default priority.
>
>
>>      name      | abbrev | utc_offset
>> ---------------+--------+------------
>>  Eire          | IST    | 01:00:00
>>  Asia/Kolkata  | IST    | 05:30:00
>>  Asia/Calcutta | IST    | 05:30:00
>>  Europe/Dublin | IST    | 01:00:00
>>
>
> Suggest you adapt to using ISO names (the name column above) for
> timezones; which are long enough and location-specific enough to be
> unique.  In your case, pick your preferred spelling of Calcutta I suppose.
>
> Thank you. I used Calcutta.
Regards,
Jayadevan


view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Doubt on pg_timezone_names and pg_timezone_abbrevs
  In-Reply-To: <CAFS1N4hHnECpW6Rn7ZvuY9NXQp1uViJvAczBtzqE2pVPey9Enw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox