collective / collective/collective.exportimport
Wrong result when updateing already existing items with timezone naive values.
- Dominant language
- Python
- Stars
- 19
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
### 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the DatetimeFieldDeserializer during the second import with timezone-naive JSON start and end values, comparing the existing stored value with the converted value. Reproduce the two-import scenario using the “Update existing item” setting and determine whether the correction belongs in collective.exportimport or plone.restapi. Done means repeated imports preserve the original naive event times without the one-hour shift.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100