Skip to content

Wrong result when updateing already existing items with timezone naive values. #164

@petschki

Description

@petschki

Scenario

I have a JSON export with Events. The start and end values do not have a timezone info.

Frist import

The event is created with the correct (=same) start/end values as in the JSON export. ✅

Second import

Importing the same JSON the second time with the setting Update existing item does the following:

  • DatetimeFieldDeserializer checks for existing value and its timezone (which is set on the first import)
  • the timezone naive JSON value is assumed as UTC and gets converted to the current timezone. In my case +01:00 and all the events have a wrong time value plus 1h.

I'm not sure if this is a plone.restapi bug or if it should be handled here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions