Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSQL returns time.Time in UTC with different nanoseconds #54

Closed
erizocosmico opened this issue Jan 30, 2017 · 4 comments
Closed

Comments

@erizocosmico
Copy link
Contributor

Not sure we can do much, but it's worth adding on the README as known limitations and keeping it here until we figure out a workaround.

@erizocosmico
Copy link
Contributor Author

Tried a PoC of using the unix timestamp. But that does not contain milliseconds as well, so... same thing.

@Serabe
Copy link
Contributor

Serabe commented May 3, 2017

More information about this lib/pq#227

I agree with the proposed solution and would love to see it coming from pq. In the meantime, can we hack something on top?

@erizocosmico
Copy link
Contributor Author

The problem is not pq, is postgres. There's just no space in a timestamptz field to store nanoseconds. Don't think there's gonna be a solution for that any time soon.

So I think it's better to just leave this open as a reminder (or document it on the readme as known issues).

@erizocosmico
Copy link
Contributor Author

Discussed this IRL with @Serabe. Solution will be to truncate all time fields before saving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants