marshmallow icon indicating copy to clipboard operation
marshmallow copied to clipboard

Add timestamp as option to DateTime Fields

Open vanHoi opened this issue 1 year ago • 1 comments

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.

vanHoi avatar Jul 28 '22 21:07 vanHoi

Thanks for the PR and sorry about the response delay.

We didn't get the time to review thoroughly yet, but this looks good.

lafrech avatar Aug 22 '22 19:08 lafrech