Показать выпадающий список

date_sunrise()

« date_sun_info | date_sunset »
<?php
// select a $timezone or enter $gmt_offset
// enter a $time or a $timestamp
// select a $city or enter the $latitude and $longitude

// gets a timestamp from a date
date_default_timezone_set(
    
? // string $timezone
);
$timestamp strtotime(
    
 // string $time
);

// gets the latitude and longitude of a city
list($latitude$longitude) = pbx_get_city_lat_lng(
    
? // string $city
);

$mixed date_sunrise (
    
// int $timestamp
    
?// [int $format = SUNFUNCS_RET_STRING]
    
// [float $latitude = ini_get("date.default_latitude")]
    
// [float $longitude = ini_get("date.default_longitude")]
    
?// [float $zenith = ini_get("date.sunrise_zenith")]
    
?  // [float $gmt_offset = 0]
);
?>
Результат
$timestamp = 1711653588
$latitude = 48.85
$longitude = 2.35
$mixed = '06:34'
Примеры
#1 date_sunrise  (/* $timezone = "Europe/Paris" */
 /* $time = "now" */
 /* $city = "Paris" */
 
$timestamp,
 
SUNFUNCS_RET_STRING,
 
$latitude,
 
$longitude)
#2 date_sunrise  (/* $time = "2014-12-20 12:00" */
 
$timestamp,
 
SUNFUNCS_RET_STRING,
 
38.72,
 -
9.13,
 
90,
 
1)
См. также
date_default_timezone_set, date_sun_info, date_sunset, pbx_get_city_lat_lng, strtotime