override
Temporarily set the time zone for the current thread.
Attributes
| Attribute | Type | Description |
|---|---|---|
| timezone | tzinfo, str, or None | The time zone to be activated, which must be an instance of a tzinfo subclass, a time zone name, or None to enable the default time zone. |
| old_timezone | tzinfo, str, or None | Stores the previously active time zone captured upon entering the context to ensure it can be restored on exit. |
Constructor
Signature
def override(
timezone: [Union](../../contrib/gis/db/models/functions/union.md?sid=django_contrib_gis_db_models_functions_union)[tzinfo, str, None]
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| timezone | [Union](../../contrib/gis/db/models/functions/union.md?sid=django_contrib_gis_db_models_functions_union)[tzinfo, str, None] | An instance of a tzinfo subclass, a time zone name, or None to enable the default time zone. |
Signature
def override(
timezone: tzinfo|str|None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| timezone | `tzinfo | str |