flower
flower copied to clipboard
Use celery app timezone
Closes #1163 #1132
The task started and received times in the task table are derived from the raw celery events which provide times as number of seconds passed since the epoch.
https://github.com/mher/flower/blob/58136bf26bb641082d31a376306b73ef5047b80f/flower/views/tasks.py#L117
This code takes timezone
into account but not enable_utc
.
https://docs.celeryq.dev/en/stable/userguide/configuration.html#time-and-date-settings
Instead of using the time and date settings from the celery configuration directly, this PR proposes to use the timezone provided by the celery app
https://github.com/celery/celery/blob/8f389997887232500d4aa1a2b0ae0c7320c4c84a/celery/app/base.py#L1360
This allows using an explicit timezone (e.g. timezone = "Europe/Paris"
) or the local timezone (enable_utc = False
).