Skip to main content

update_connections_time_zone

Updates the process environment, local timezone cache, and active database connections when the Django TIME_ZONE or USE_TZ settings are modified.

def update_connections_time_zone(
setting: string,
kwargs: dict
)

Updates the process environment and active database connections when time zone settings are modified. This function ensures that the OS-level TZ environment variable, the Django default timezone cache, and all initialized database connection time zones are synchronized with the new configuration.

Parameters

NameTypeDescription
settingstringThe name of the Django setting that was changed, used to determine if a time zone refresh is required.
kwargsdictAdditional keyword arguments containing the new setting value and other signal metadata.

Returns

TypeDescription
None