Re: to_timestamp TZH and TZM format specifiers

From: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: to_timestamp TZH and TZM format specifiers
Date: 2018-01-03 19:33:25
Message-ID: bdd46ec8-8d17-27ad-eb52-4061c7e11c2a@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/03/2018 07:03 PM, Andrew Dunstan wrote:
>
> This small and simple standalone patch extracted from the SQL/JSON work
> would allow the user to supply a string with a time zone specified as
> hh:mm thus:
>
>
> SELECT to_timestamp('2011-12-18 11:38 -05:20', 'YYYY-MM-DD HH12:MI
> TZH:TZM');
>          to_timestamp        
> ------------------------------
>  Sun Dec 18 08:58:00 2011 PST
>
> The patch seems pretty straightforward to me, and it's required for the
> jsonpath patches which would be the next cab off the rank in the
> SQL/JSON work.
>
>
> It seems like something worth having quite independently of the SQL/JSON
> stuff anyway.

Shouldn't this support TZS or something for seconds?
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-01-03 19:37:02 Re: Better testing coverage and unified coding for plpgsql loops
Previous Message Alvaro Herrera 2018-01-03 19:31:44 Re: Better testing coverage and unified coding for plpgsql loops