1. Go to this page and download the library: Download namnv609/timezonedb-php-api 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/ */
namnv609 / timezonedb-php-api example snippets
use NNV\TimeZoneDB;
$tzDB = new TimeZoneDB(<TimeZoneDB API Key>);
$convertTimeZoneParams = [
"from" => "America/Los_Angeles",
"to" => "Australia/Sydney",
"time" => "06/01/2016 03:00PM", // You can use standard DateTime format or Unix time
// Other params
];
$tzDB->convertTimeZone($convertTimeZoneParams);