Skip to content

[bug] Europe/Kyiv and Asia/Qostanay timezones fail validation in some processes #429

Closed

Description

@G26karthik

Describe the bug
In netjsonconfig/backends/openwrt/timezones.py, two entries are sets instead of tuples (lines 282 and 380):

{"Asia/Qostanay", "<+06>-6"},
{"Europe/Kyiv", "EET-2EEST,M3.5.0/3,M10.5.0/4"},

OrderedDict unpacks a set in string hash order, which changes in every Python process. In about half of the processes the zone name and the TZ string are swapped, so the schema enum lacks that zone and a config using it fails validation. I found this while reading the code.

Steps To Reproduce

PYTHONHASHSEED=2 python -c "from netjsonconfig import OpenWrt; OpenWrt({'general': {'timezone': 'Europe/Kyiv'}}).render()"

This raises ValidationError 'Europe/Kyiv' is not one of [...]. With PYTHONHASHSEED=0 it renders fine.

Expected behavior
Both zones validate in every process.

Screenshots
N/A

System Informatioon:

  • OS: Windows 11
  • Python Version: Python 3.13.15

Outdated values in this file are #352; this is only about these two entries. I have a two-line fix with a test.

Activity

  1. added theissue type on Nov 9, 2026
  2. nemesifier commented on Nov 9, 2026

    @nemesifier
    Member

    @G26karthik please send a (small) patch.

  3. openwisp-companion commented on Nov 9, 2026

    @openwisp-companion

    This issue has been automatically assigned to @G26karthik, who opened PR #430. 🎯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions