jlab-sensing / DirtViz

DirtViz is a project to visualize data collected from sensors deployed in sensor networks.
https://dirtviz.jlab.ucsc.edu/
MIT License
4 stars 8 forks source link

Dashboard Data Failure for Positive Timezones #198

Closed ay-bh closed 3 months ago

ay-bh commented 4 months ago

Bug Description

The dashboard fails to display data due to backend endpoints /api/power & /api/terros generating 500 errors when handling requests with positive timezone offsets (+XX:XX). Requests with negative offsets (-XX:XX) work as expected.

Issue Demonstration:

Local server logs suggest a ValidationError related to startTime and endTime query parameters, indicating an issue with datetime format validation (Marshmallow schema). Server logs

Steps to Reproduce

  1. Set your browser's timezone to a location with a positive offset (e.g., Mumbai). Guide to change timezone in Chrome
  2. Attempt to access datasets via the dashboard.

Alternatively:

Expected Behavior

The backend should correctly process requests across all timezones or potentially become timezone agnostic by standardising to a single timezone.

Screenshots

Issue screenshot

Environment