gemini-hlsw / gem

prototype postgres back-end for ocs
Other
15 stars 5 forks source link

Issue #241: don't generate ancient timestamps #246

Closed swalker2m closed 6 years ago

swalker2m commented 6 years ago

A workaround for what appears to be a java.sql.Timestamp formatting issue for ancient timestamps. See #241.

tpolecat commented 6 years ago

I wonder if we should go ahead and change Timestamp.Min to year zero since the whole point was to have a class with a total mapping to and from Postgres.

swalker2m commented 6 years ago

gem.util.Timestamp does map to Postgres, but something about java.sql.Timestamp seems to generate an issue when actually writing ancient values to the database with JDBC. So maybe you're right.

tpolecat commented 6 years ago

What you have here is fine for now.

cquiroz commented 6 years ago

I haven't read this at all but perhaps this tool is useful?

https://47deg.github.io/scalacheck-toolbox/docs/datetime/index.html