Closed
Description
I've run into issue when default format_datetime unmarshaller strips date time TZ as their code,
timestamp = strict_rfc3339.rfc3339_to_timestamp(value)
return datetime.datetime.utcfromtimestamp(timestamp)
convert datetime
string to timestamp and create new datetime.datetime
instance without tzinfo
.
This means, for schema,
value:
type: "string"
format: "date-time"
request or parameter data,
{"value": "2020-04-01T12:00:00+02:00"}
will result in value
of datetime.datetime(2020, 4, 1, 10, 0, 0, tzinfo=None)
(tz naive datetime value) instead of tz aware datetime value.
I've managed to fix it by supplying isodate.parse_datetime as unmarshaller for date-time
strings in playpauseandstop/rororo#39 and would like to ask you consider change current format_datetime
unmarshaller to parse_datetime
function instead.