Saving timestamp as-is
I am trying to use marshmallow.fields.DateTime and trying to save 2017-06-27T07:49:40-04:00 for example, but it keeps converting it to 2017-06-27T06:49:40+00:00
(I am in EDT)
I am not quite sure what the documentation means
Timezone-naive datetime objects are converted to UTC (+00:00) by Schema.dump. Schema.load returns datetime objects that are timezone-aware.
Is it converting to the system timezone? Because I don't want it to do that.
Is there a way I can force Marshmallow to leave the timestamp alone? Or do I have to revert to using fields.string instead of fields.datetime?
Bump
using marshmallow.fields.LocalDateTime ?
Yes, LocalDateTime should meet your use case.