1--TEST--
2Basic test for date_sunrise and date_sunset based on example in PHP manual
3--FILE--
4<?php
5
6date_default_timezone_set('UTC');
7
8/* calculate the sunrise time for Lisbon, Portugal
9Latitude: 38.4 North
10Longitude: 9 West
11Zenith ~= 90
12offset: +1 GMT
13*/
14
15echo "Basic test for date_sunrise() and date_sunset()\n";
16
17echo date("D M d Y") . ', sunrise time : ' . date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n";
18echo date("D M d Y") . ', sunset time : ' . date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n";
19
20?>
21===Done===
22--EXPECTF--
23Basic test for date_sunrise() and date_sunset()
24%s %s %d %d, sunrise time : %d:%d
25%s %s %d %d, sunset time : %d:%d
26===Done===
27