Oddly enough I built an API a few years ago that does exactly that, using timezone polygons derived from OpenStreetMap: https://timezones.datasette.io/timezones/by_point?longitude=...