PHP code example of glhd / laravel-timezone-mapper
1. Go to this page and download the library: Download glhd/laravel-timezone-mapper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
glhd / laravel-timezone-mapper example snippets
$mapped_timezone = TimezoneMapper::mapCoordinates(
latitude: 51.50853,
longitude: -0.12574,
fallback: 'America/New_York', // Optional -- used if unable to map coords
);
// Returns "Europe/London"