Skip to content

Commit

Permalink
support enable_utc in addition to timezone: let celery handle the tim…
Browse files Browse the repository at this point in the history
…ezone to support future changes
  • Loading branch information
woutdenolf committed Jan 22, 2024
1 parent 58136bf commit c711966
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flower/views/tasks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import copy
import logging
from datetime import datetime
from functools import total_ordering

from tornado import web
Expand Down Expand Up @@ -112,9 +113,9 @@ def get(self):
app = self.application
capp = self.application.capp

time = 'natural-time' if app.options.natural_time else 'time'
if capp.conf.timezone:
time += '-' + str(capp.conf.timezone)
time_type = 'natural-time' if app.options.natural_time else 'time'
tzname = capp.timezone.tzname(datetime.now())
time = f"{time_type}-{tzname}"

self.render(
"tasks.html",
Expand Down

0 comments on commit c711966

Please sign in to comment.