Search Postgresql Archives

Re: to_json(now()) result doesn't have 'T' separator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, Dec 20, 2013 at 4:18 PM, Joe Van Dyk <joe@xxxxxxxxx> wrote:
# select to_json(now());
             to_json
---------------------------------
 "2013-12-20 15:53:39.098204-08"
(1 row)

I'd like to see it output "2013-12-20T15:53:39.098204-08" so it's interchangeable with more systems.

Actually, "2013-12-20T15:53:39.44553-08:00" would be ideal.

 


I'm working with _javascript_/json systems that expect the 'T' to be there however, so there's no mutual agreement happening.

Thoughts? I know I can hack around it by specifying my own date format, but I'd really like to be able to use row_to_json and other functions without specifying custom date formats everywhere.

Joe


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux