From e56ec50c1622010c010e1c84bc02ce44285c4f41 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 17 Aug 2014 22:57:15 -0400 Subject: Use ISO 8601 format for dates converted to JSON, too. Commit f30015b6d794c15d52abbb3df3a65081fbefb1ed made this happen for timestamp and timestamptz, but it seems pretty inconsistent to not do it for simple dates as well. (In passing, I re-pgindent'd json.c.) --- doc/src/sgml/release-9.4.sgml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/release-9.4.sgml b/doc/src/sgml/release-9.4.sgml index 7ae67e0cec2..5330c425d3d 100644 --- a/doc/src/sgml/release-9.4.sgml +++ b/doc/src/sgml/release-9.4.sgml @@ -120,7 +120,7 @@ - When converting values of type timestamp + When converting values of type date, timestamp or timestamptz to JSON, render the values in a format compliant with ISO 8601 (Andrew Dunstan) @@ -129,7 +129,10 @@ Previously such values were rendered according to the current setting; but many JSON processors - require timestamps to be in ISO 8601 format. + require timestamps to be in ISO 8601 format. If necessary, the + previous behavior can be obtained by explicitly casting the datetime + value to text before passing it to the JSON conversion + function. -- cgit v1.2.3