| Package Data | |
|---|---|
| Maintainer Username: | inxilpro |
| Package Create Date: | 2019-07-31 |
| Package Last Update: | 2023-07-03 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-06 03:00:27 |
| Package Statistics | |
|---|---|
| Total Downloads: | 187,430 |
| Monthly Downloads: | 12,558 |
| Daily Downloads: | 842 |
| Total Stars: | 44 |
| Total Watchers: | 1 |
| Total Forks: | 1 |
| Total Open Issues: | 0 |
This package maps coordinates to a timezone string. Based heavily on TimezoneMapperPHP and LatLongToTimezone and adopted for use in a Laravel project.
It's not likely to be 100% correct every time, but if you need to map lots of coordinates and don't want to make API calls each time, it's a good way to get reasonable defaults.
$mapped_timezone = TimezoneMapper::mapCoordinates(
latitude: 51.50853,
longitude: -0.12574,
fallback: 'America/New_York', // Optional -- used if unable to map coords
);
// Returns "Europe/London"