-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Attributes
-
None
-
Fully Compatible
Time.demongoize could attempt to demongoize string input in various formats, for example:
Time.demongoize("2022-04-20T17:20:04.75-07:00") #=> undefined method `getlocal' for "2022-04-20T17:20:04.75-07:00":String (NoMethodError)
The `#demongoize` method is expected to work for a variety of input types, not just Time, as the user may have stored strings in their database previously then changed the field type.
This suggestion was originally reported in this PR: https://github.com/mongodb/mongoid/pull/5245 by Github user @alilland{}
When this ticket is implemented, the following needs to be considered:
Which time formats to parse
Time zones