• Andrew Dunstan's avatar
    Use EncodeDateTime instead of to_char to render JSON timestamps. · ab14a73a
    Andrew Dunstan authored
    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
    ab14a73a
json.c 60.1 KB