Multiple weather instances with different timezones interfere when running in the same process
Issue Description
Multiple weather instances with different timezones interfere when running in the same process:
With two xfce4-weather-plugin instances configured for different timezones (e.g. CEST and EDT), refreshing one instance changes the date/time displayed by the other instance to the same timezone.
Additional Information
I traced this to update_timezone():
g_setenv("TZ", data->timezone, TRUE);data->timezone is per-instance, but TZ is process-global. Therefore, when multiple weather instances run inside the same process, the last instance that calls update_timezone() changes the timezone subsequently used by all instances through libc time functions.
This is reproducible with a fresh user configuration.
Under X11, each weather instance runs in a separate wrapper-2.0 process, so the problem is hidden by process isolation.
Under xfwl4, multiple weather instances are loaded into the same xfce4-panel process, exposing the problem.
Expected behavior:
Multiple weather-plugin instances should be able to use different timezones independently when running in the same process.
Environment & Versions
- Xfce 4.20 / xfce4-panel 4.21.2-dev-2a21dfa66
- xfwl4 Wayland session
- xfce4-weather-plugin version : 0.12.0-dev-c2497954
- Fresh test user configuration