Refactor #1068
closedUse mongoengine.fields.DateTimeField for all models
0%
Description
We currently represent date times in many ways and it adds a significant amount of unnecessary complication to many areas in our code.
Internally, all date times should be a mongoengine DateTime and externally we should use a single string representation of this field. The only part of our code that should interact with these strings are the serializers, which should used to convert both ways.
1. All date times serverside can be assumed to be mongoengine DateTimes
2. All user facing date times are strings of the same format
3. All code that is responsible for switching between date time types can go away, including `pulp/common/dateutils.py` and `pulp/server/webservices/views/util.py: pulp_json_encoder`.
4. All conversion can be written in the base class for serializers, and we should never have to think about it again.