PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Ahmad Retha  >  PHP Time Zone Mapper  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Time Zone Mapper
Get time zone for a given latitude and longitude
Author: By
Last change:
Date: 6 years ago
Size: 467 bytes
 

Contents

Class file image Download

TimezoneMapperPHP

Given a latitude and a longitude of a location, this program will return the timezone string.

This is the PHP version of the end product of: https://github.com/drtimcooper/LatLongToTimezone

It is released under the same license (MIT).

Usage

<?php
include 'TimezoneMapper.php';
$london = ['lat' => 51.504380, 'lng' => -0.127727];
echo TimezoneMapper::latLngToTimezoneString($london['lat'], $london['lng']);
//outputs: Europe/London
For more information send a message to info at phpclasses dot org.