Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use celery app timezone #1351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
support enable_utc in addition to timezone: let celery handle the tim…
…ezone to support future changes
  • Loading branch information
woutdenolf committed Jan 22, 2024
commit c7119662f711e008b71c7981589bf948b919ad20
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
Loading