Closed ghost closed 6 years ago
As discussed in Chime, I've removed the Date -> Time test as it's a pretty silly thing to do anyway. Anyone trying to save a Date as a Time attribute is just asking for it, and when they retrieve that record they can expect it to be a Time object anyway.
Description of changes:
RuboCop guidance says to avoid DateTime: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/DateTime https://github.com/rubocop-hq/rubocop/issues/1952
And additionally, the Ruby docs recommend to use Time:
https://ruby-doc.org/stdlib-2.5.1/libdoc/time/rdoc/Time.html
With DateTime, we're able to save a Time object to DynamoDB but it comes back out as a DateTime. I added a time marshaler and defined a time_attr so that we can store serialized Time objects.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.