问题描述:

I am developing a Ruby on Rails application which logic strongly relies on timestamps. They must have an accuracy of 1 ms. I use PostgreSQL as the DB. While recent version of PostgreSQL support date/time columns with microsecond accuracy (values are internally stored as integers), it is dropped when ActiveRecord builds objects upon these data because ActiveSupport::TimeWithZone internally uses floats.

Before I will rewrite part of ActiveSupport::TimeWithZone or ActiveRecord's logic I would kindly ask if anyone knows a drop-in, well-tested solution for this problem? I was seeking for gems but I wasn't able to find anything meaningful.

相关阅读:
Top