As useful as forcing a specific locale, it is useful to be able to enforce a specific timezone.
In my case, I want to render a template for a specific user who has a preferred timezone, but this is not a logged in user, why it would be too complicated to implement this via a request context aware timezoneselector.
The implementation and behaviour of force_timezone() is similar to the existing context manager force_locale().
As useful as forcing a specific locale, it is useful to be able to enforce a specific timezone.
In my case, I want to render a template for a specific user who has a preferred timezone, but this is not a logged in user, why it would be too complicated to implement this via a request context aware
timezoneselector
.The implementation and behaviour of
force_timezone()
is similar to the existing context managerforce_locale()
.