marshmallow
marshmallow copied to clipboard
Add timestamp as option to DateTime Fields
This PR adds the possibility to load and dump to timestamps.
This was discussed before in issue #612 and then partly implemented in #1003. Since the branch was stale (still on Marshmellow 2) I decided to start over.
The difficulty with timestamps is that you can't infer a timezone from a timestamp. Since the introduction of AwareDateTime and NaiveDateTime however, this issue is mostly solved. By specifying a default timezone, the user can add the correct timezone when it is required.
Thanks for the PR and sorry about the response delay.
We didn't get the time to review thoroughly yet, but this looks good.