sijms / go-ora

Pure go oracle client
MIT License
771 stars 169 forks source link

v2.8.6: Loss of fractional time.Time components #503

Closed bobvawter closed 6 months ago

bobvawter commented 6 months ago

When upgrading from v2.8.4 to v2.8.6, I'm seeing TIMESTAMP values being truncated to seconds; the millis / nanos appear to be dropped after a round-trip through the database. I think there may be an error in that new test helper isEqualTime(). It doesn't consider the nanoseconds component of a time.Time.

https://github.com/sijms/go-ora/commit/ed09940b42480217da6f721f7154f7c9c941c155#diff-c3fcafc126c4111b50843268d0971bcc3a8ae232a16fb9c2da3fba02e53a8888R81

If the goal of this function is to check whether or not two times represent the same instant, it's often simpler to compare the result of https://pkg.go.dev/time#Time.UnixNano as a value which is independent of time zones.

sijms commented 6 months ago

fixed in v2.8.7