summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAndrew Dunstan2014-06-03 22:26:47 +0000
committerAndrew Dunstan2014-06-03 22:26:47 +0000
commitab14a73a6ca5cc4750f0e00a48bdc25a2293034a (patch)
treef2b0ad98b0346ed6824798052d752d9bd48e64ba /src/test
parent0ad1a816320a2b539a51628e2a0b1e83ff096b1d (diff)
Use EncodeDateTime instead of to_char to render JSON timestamps.
Per gripe from Peter Eisentraut and Tom Lane. The output is slightly different, but still ISO 8601 compliant: to_char doesn't output the minutes when time zone offset is an integer number of hours, while EncodeDateTime outputs ":00". The code is slightly adapted from code in xml.c
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/json.out6
-rw-r--r--src/test/regress/expected/json_1.out6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/regress/expected/json.out b/src/test/regress/expected/json.out
index 43341aa9bb5..8b8556b2e04 100644
--- a/src/test/regress/expected/json.out
+++ b/src/test/regress/expected/json.out
@@ -420,9 +420,9 @@ select to_json(timestamptz '2014-05-28 12:22:35.614298-04');
SET LOCAL TIME ZONE -8;
select to_json(timestamptz '2014-05-28 12:22:35.614298-04');
- to_json
----------------------------------
- "2014-05-28T08:22:35.614298-08"
+ to_json
+------------------------------------
+ "2014-05-28T08:22:35.614298-08:00"
(1 row)
COMMIT;
diff --git a/src/test/regress/expected/json_1.out b/src/test/regress/expected/json_1.out
index 953324637d8..b32c3ed09f3 100644
--- a/src/test/regress/expected/json_1.out
+++ b/src/test/regress/expected/json_1.out
@@ -420,9 +420,9 @@ select to_json(timestamptz '2014-05-28 12:22:35.614298-04');
SET LOCAL TIME ZONE -8;
select to_json(timestamptz '2014-05-28 12:22:35.614298-04');
- to_json
----------------------------------
- "2014-05-28T08:22:35.614298-08"
+ to_json
+------------------------------------
+ "2014-05-28T08:22:35.614298-08:00"
(1 row)
COMMIT;