home / timezones

Find timezone by lat/lon

Returns the timezone for a specified point on Earth

Custom SQL query returning 1 row

select tzid
from
    timezones
where
    within(GeomFromText('POINT(' || :longitude || ' ' || :latitude || ')'), timezones.Geometry)
    and rowid in (
        SELECT pkid FROM idx_timezones_Geometry
        where xmin < :longitude
        and xmax > :longitude
        and ymin < :latitude
        and ymax > :latitude
    )

Query parameters

tzid
America/Los_Angeles
Powered by Datasette · Query took 9.51ms