PHP Doku:: Returns location information for a timezone - datetimezone.getlocation.html

Verlauf / Chronik / History: (4) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatums- und zeitrelevante ErweiterungenDatum und UhrzeitThe DateTimeZone classDateTimeZone::getLocation

Ein Service von Reinhard Neidl - Webprogrammierung.

The DateTimeZone class

<<DateTimeZone::__construct

DateTimeZone::getName>>

DateTimeZone::getLocation

(PHP 5 >= 5.3.0)

DateTimeZone::getLocationReturns location information for a timezone

Beschreibung

Objektorientierter Stil

public array DateTimeZone::getLocation ( void )

Prozeduraler Stil

array timezone_location_get ( void )

Returns location information for a timezone, including country code, latitude/longitude and comments.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

Array containing location information about timezone.

Beispiele

Beispiel #1 DateTimeZone::getLocation() example

<?php
$tz 
= new DateTimeZone("Europe/Prague");
print_r($tz->getLocation());
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

Array
(
    [country_code] => CZ
    [latitude] => 50.08333
    [longitude] => 14.43333
    [comments] => 
)


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)