meetnearme / api

1 stars 0 forks source link

Derive timezone from geolocation on DB insert #109

Open brianfeister opened 3 months ago

brianfeister commented 3 months ago

In order to prevent user toil, we want to auto-detect timezone (dropdown fatigue for data entry is real) as derived from latitude and longitude. Events that lack geocoordinates will be discarded / not eligible for DB insertion

We have a few different paths where events can be updated:

In all cases, we should have a DB hook (possibly in the DB mapper layer @msnorth ?) that uses an internal service to derive timezone from latitude / longitude.

I've found these libraries, which don't have tons of stars, but I'm also comfortable with the idea we might have to fork / update them. They are mostly just a dictionary with some minimal abstractions over top.

We can use this as an internal timezone service that updates timezone for an event, any time the latitude and longitude change.

Open to suggestions if anyone finds other / better libraries. Also, I'm sure it's easy to swap this out / undo our decision regarding library in the future

Performance of the options should be compared, any of these will have an impact on cold lambda start times and the base lookup latency timing