Bogdanp / django_dramatiq

A Django app that integrates with Dramatiq.
https://dramatiq.io
Other
331 stars 77 forks source link

Align output of 'ETA' column with USE_TZ config setting #51

Closed jcass77 closed 4 years ago

jcass77 commented 4 years ago

The timezone used to render the 'ETA' column in the Task admin does not appear to correspond with that of the created_at and updated_at DateTimeField fields. This results in different timezones being used to render date-based columns in the same row, which can be quite confusing.

My understanding is that the USE_TZ setting should be used to configure how Django stores and deals with timezone information.

Since the Task admin interface generates the 'ETA' column dynamically based on the message's (UTC-based) timestamp, we should probably also consider the value of the USE_TZ setting to ensure that timezone information is applied consistently for all columns in the relevant admin interface.

jcass77 commented 4 years ago

Example output on a system where USE_TZ = True:

Pasted_Image_2019_08_20__10_21

Here, eta == created_at but the timezone is not applied correctly in the admin view.

Bogdanp commented 4 years ago

Thanks! This is now merged with rebase. I'll cut the v0.8 release next weekend.