Re: to_date conversion semantics?

From: Richard Huxton <dev(at)archonet(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: to_date conversion semantics?
Date: 2010-09-20 19:27:10
Message-ID: 4C97B58E.9080204@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 20/09/10 20:18, Colin 't Hart wrote:
> The 32nd of Undecember (!) turning into the 1st of February of the
> next year... instead of throwing an exception like I expect.

What Tom said, but it's presumably using mktime(...) somewhere internally.

perl -MPOSIX -e 'print scalar gmtime(mktime(0,0,0,32,13-1,73)),"\n"'
Fri Feb 1 00:00:00 1974

http://perldoc.perl.org/POSIX.html#mktime
http://linux.die.net/man/3/mktime

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dmitriy Igrishin 2010-09-20 19:34:59 Re: INSERT with SELECT not working in pgAdmin
Previous Message Tom Lane 2010-09-20 19:21:28 Re: to_date conversion semantics?