Postgres, Timestamps and the C API

A surprise from libpq: pass "1" for binary results and a Postgres timestamp comes back as a 64-bit count of microseconds since 2000. Here's the arithmetic to turn 303,687,735,731,339 back into a date you recognize.

This post is for members only

Already have an account? Sign in.

Subscribe to A garage sale for your mind

Don’t miss out on the latest posts. Sign up now to get access to the library of members-only posts.
[email protected]
Subscribe