我对datetime字段的序列化有问题。我正在使用来自django rest框架的serializers.DateTimeField,当我试图将2018-09-04T00:00:00+0100作为查询param发送时,我获得了400个状态。如果时区偏移量是负的-它的工作完美。"date": [
"Datetime has wrong format.Use one of these formats instead: YYYY-MM-DDThh:mm[:
需要解析格式2016-06-24T13:39:44.687680中的日期时间。
第一步使用,尝试分析时间没有微秒与行。System.out.println(OffsetDateTime.parse("2011-12-03T10:15:30", DateTimeFormatter.ISO_LOCAL_DATE_TIME)2011-12-03T10:15:30' could not be parsed: Unable to o
yyyy-MM-dd";
但是我在解析时有这样的错误java.time.format.DateTimeParseException: Text '2019-07-10' could not be parsed: Unable to obtain OffsetDateTime from TemporalAccessor: {},ISO