Skip to content

Zimfarm upgrade: Datetime presented in the UI are wrong #1201

@benoit74

Description

@benoit74

While the DB stores only naive datetime (assuming they are all UTC), in the past the backend API always returned TZ-aware datetime for proper UI rendering. It simply consisted in adding back the UTC TZ information.

Now, the API is returning naive datetime, and the UI is hence wrongly considering these are local times.

One typical symptom is that a task which has just started is reported as having started 2 hours ago (because I'm UTC+2 currently).

This should be fixed in some way. I feel like restoring previous behavior where the API returned TZ-aware datetime is the good solution, because we cannot expect all API consumers to "guess" that all naive datetime are in fact UTC. The fact that we manipulate naive datetime at DB-leve and inside the backend is an internal optimization which should not leak to the API inputs / outputs.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions