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

Timestamp fields may not compare equal after round-trip to DynamoDB #2

Closed
philipmw opened this issue May 5, 2015 · 2 comments
Closed

Comments

@philipmw
Copy link
Member

philipmw commented May 5, 2015

Timestamp fields may not compare equal after round-trip to DynamoDB. The root cause is that Time.at(some_time_obj.to_f) is not always equal to some_time_obj, in at least MRI and JRuby.

For now, the best workaround is to compare timestamps with the aid of an epsilon.

Another solution is for Dynamoid to use Time#_dump and Time::_load to persist timestamps, but we must take care to not break backward compatibility with existing records in DynamoDB.

@philipmw
Copy link
Member Author

This will be fixed in the next major version.

@philipmw
Copy link
Member Author

Fixed in v1.0.0.

andrykonchin added a commit that referenced this issue Nov 3, 2024
# This is the 1st commit message:

Skip specs for callback aborting on Rails 4.2

# The commit message #2 will be skipped:

# @fixup Skip specs for callback aborting on Rails 4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant