-
-
Notifications
You must be signed in to change notification settings - Fork 157
Description
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
- Change the timezone in your browser (or system to Asia/Kolkata)
- Open OpenWISP dashboard
- 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/Calcutta → Asia/Kolkata)
References:
- Source issue: [bug] Time zone error (error parsing query: unable to find time zone) ansible-openwisp2#541
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
Labels
Type
Projects
Status