GardenHub
GardenHub copied to clipboard
Introduce proper timezone support for users and gardens
Right now we're assuming everything is in EST. However, it's possible for a garden or user to be in a timezone outside of EST.
To account for this, each garden should have a "timezone" field that can be set on the edit screen. I'm envisioning a dropdown with all the possible options. EST can be the default.
Likewise, users should be able to specify their own timezones in their profile, and this will be taken into account when placing orders. Currently if a user were on Baker Island, placing an order on a garden in Philadelphia, it would be unclear when the start date of the order actually is. I mean, we're 7 hours apart. Imagine you're on Baker Island, it's January 5 at 5pm, and you try to make an order for "tomorrow." You select Jan 6, but the UI keeps saying "sorry, we need 24 hours notice." It's confusing. There are probably worse scenarios than this, it's an example.
Order start_date and end_date times are stored as naive dates. Basically just strings, in the database. If they were saved relative to the garden's timezone, it wouldn't be an issue, though.