51609b61a4
Cinderlib's methods and property that convert objects to json end up losing resolution on DateTime fields. Since json doesn't have a datetime fields they are stored as strings, but they are not storing subsecond information. This means that datetime fields that are serialized and then deserialized are different. This patch changes the way we format the string to use the ISO-8601 subsecond format instead of the standard second format. This is a backward compatible change, as this version of cinderlib will be able to read old datetime string, and old cinderlib code will be able to read new datetime strings as well (even if it cannot generate them). The old code is able to read the new format because the from_primitive code of the OVO field uses oslo_utils.timeutils.parse_isotime which in the end uses iso8601.parse_date, and since the subsecond format is also ISO8601 it is properly parsed. Change-Id: I1422e833ec0ec50376d4afac91f22c7b60bf996b Closes-Bug: #1933964 |
||
---|---|---|
.. | ||
functional | ||
unit | ||
__init__.py |