You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that node-postgres is converting timestamptz strings from postgres into JavaScript date objects.
Upon stringification of this date object, JavaScript returns an IETF-compliant RFC 2822 timestamps such as "Fri Jul 15 2016 20:49:50 GMT-0400 (EDT)". I'd prefer that my API server return ISO 8601 string such as "2016-07-16T00:49:50.000Z".
It seems that node-postgres is converting timestamptz strings from postgres into JavaScript date objects.
Upon stringification of this date object, JavaScript returns an IETF-compliant RFC 2822 timestamps such as
"Fri Jul 15 2016 20:49:50 GMT-0400 (EDT)"
. I'd prefer that my API server return ISO 8601 string such as"2016-07-16T00:49:50.000Z"
.It seems that this can be accomplished using the node-pg-types as @brianc suggests.
I'm not sure how to get direct access to pg-promise's
pg
dependency. Is this exposed? Is there a better way to go about doing this?The text was updated successfully, but these errors were encountered: