seanmorley15/AdventureLog

[BUG] Missing timezones when creating lodging entry

Closed this issue ยท 0 comments

๐Ÿž Bug Description

While creating a lodging in my local timezone (Asia/Kolkata), I get the following error in the API call: "Asia/Kolkata" is not a valid choice.

๐Ÿ”„ Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new lodging entry modal
  2. In the "Date Information" section, set the timezone to "Asia/Kolkata"
  3. Try to save the lodging
  4. Observe the error

โœ… Expected Behavior

Lodging gets created with the check-in and check-out times set in the provided timezone.

๐Ÿณ Environment Details

  • Platform: Docker
  • Install Method: Docker Compose
  • AdventureLog Version: 0.11.0
  • Reverse Proxy: None

๐Ÿ“Ž Additional Context

  • This seems to be happening because timezones are being provided by two different sources:
    • In the frontend, the timezone selector uses the Intl APIs to populate the timezone values
    • In the backend, there is a hard-coded set of values accessed from the timezones.py file.
  • The issue above happens because the backend expects a value of Asia/Calcutta (the old name of the city) whereas the frontend is sending Asia/Kolkata (the new name of the city).