mirror of
https://github.com/GSA/notifications-api.git
synced 2026-06-03 21:08:26 -04:00
Marshmallow v3 has changed the way that DateTimes get serialized (https://marshmallow.readthedocs.io/en/stable/upgrading.html#datetime-leaves-timezone-information-untouched-during-serialization). In order to avoid breaking anything, we want to keep the existing way of handling DateTimes for now - this could be changed later. We can't just pass a `format` argument to a DateTime field with the old format, which looked like this `2017-09-19T00:00:00+00:00`. When we tried that, Marshmallow then expected data that we are loading to also have that format, which it doesn't. This adds a new field, which serializes data in the old format but which doesn't require data that is being deserialized to have such a precise format.