I have a Flask app that stores a user's timezone (from pytz.common_timezones
) in a database.
I store records in the DB using a UTC timestamp.
I want to display these records to end-users according to their timezone.
Is it best to:
Iterate through each record and convert the timezone before passing it to
render_template
?--or--
Define a macro within my view that performs this conversion within the template itself?
Are there any best practices for converting a naive timezone to a local timezone?