Skip to content

[bug] Deprecated timezone Asia/Calcutta causes dashboard failures  #728

@pandafy

Description

@pandafy

Describe the bug

If the OpenWISP dashboard or API receives the timezone Asia/Calcutta (now deprecated in most Linux distributions in favor of Asia/Kolkata), it causes upstream errors with InfluxDB or other dependencies. The query fails with an error similar to:

{"error":"error parsing query:  unable to find time zone Asia/Calcutta"}

This is due to Asia/Calcutta being a legacy timezone name. Not all systems provide it, and modern distributions expect Asia/Kolkata instead.

Steps To Reproduce

  1. Change the timezone in your browser (or system to Asia/Kolkata)
  2. Open OpenWISP dashboard
  3. The dashboard/API reports a 500 error if running on a system without the legacy Asia/Calcutta (see [bug] Time zone error (error parsing query: unable to find time zone) ansible-openwisp2#541)

Expected behavior

Normalize deprecated/legacy timezone names to their current valid names before passing to InfluxDB or other backends (Asia/CalcuttaAsia/Kolkata)

References:


Suggested resolution:
Implement timezone normalization or input validation in the application code to prevent deprecated or unknown timezones from propagating to InfluxDB. We need to find a list of deprecated timezones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtimeseriesIssues / PRs / tasks related to timeseries database

    Type

    Projects

    Status

    To do (Python & Django)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions