Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Use default timestamp type parser #159

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

aheuermann
Copy link
Contributor

I noticed that timestamps did not include milliseconds when retrieved from the db. I looked at changing the TIMESTAMP_FORMAT, but this method will receive two formats one with milliseconds yyyy-MM-dd HH:mm:ss.SSS and other times with microseconds yyyy-MM-dd HH:mm:ss.SSSSSS. The stringToTimeStamp falls back to seconds if the date isn't specific. I talked to Doug, and this was added in 2012 when I don't think there was a parser for this type in pg-types, which was part of pg at the time. It has since been added, so removing this uses the default parser in pg-types](https://github.com/brianc/node-pg-types/blob/f320a111e242716dde68f619fdef44969803f039/lib/textParsers.js#L166).

Going to run this against the c2fo tests to make sure everything passes.

@coveralls
Copy link

coveralls commented Mar 29, 2019

Coverage Status

Coverage increased (+0.004%) to 88.924% when pulling 8eedcfd on use-default-timestamp-type-parser into 110cf7e on master.

@aheuermann aheuermann force-pushed the use-default-timestamp-type-parser branch from 23090dc to 74b3a3a Compare March 29, 2019 15:19
@aheuermann
Copy link
Contributor Author

Looks like c2fo is still on 2.0.0, so will need to cut a 2.1.0 release.

@jonstacks
Copy link
Contributor

@aheuermann, I have an open branch for c2fo that bumps node from 5 -> 6 and patio from 2 -> 3 if it matters and this can wait a week or so.

@aheuermann
Copy link
Contributor Author

aheuermann commented Apr 2, 2019

@jonstacks that sounds good, we can release it with that.

@aheuermann aheuermann force-pushed the use-default-timestamp-type-parser branch from 74b3a3a to 8eedcfd Compare April 3, 2019 14:44
@aheuermann aheuermann merged commit 3f000bc into master Apr 3, 2019
@aheuermann aheuermann deleted the use-default-timestamp-type-parser branch April 3, 2019 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants