From: Tom Lane Date: Thu, 29 Dec 2016 23:05:34 +0000 (-0500) Subject: Fix incorrect example of to_timestamp() usage. X-Git-Tag: REL9_2_20~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce15751eed7ebdc44d6c1ce642606f5adfef0dc3;p=postgresql Fix incorrect example of to_timestamp() usage. Must use HH24 not HH to read a hour value exceeding 12. This was already fixed in HEAD in commit d3cd36a13, but I didn't think of backpatching it. Report: https://postgr.es/m/20161229170043.10139.21416@wrigleys.postgresql.org --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index c37ef80026..ff8cd0d56e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -5729,7 +5729,7 @@ SELECT regexp_matches('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); Here is a more complex example: - to_timestamp('15:12:02.020.001230', 'HH:MI:SS.MS.US') + to_timestamp('15:12:02.020.001230', 'HH24:MI:SS.MS.US') is 15 hours, 12 minutes, and 2 seconds + 20 milliseconds + 1230 microseconds = 2.021230 seconds.