--TEST--
Test date_default_timezone_get() function : error conditions
---INI--
-date.timezone=UTC
--FILE--
<?php
/* Prototype : string date_default_timezone_get ( void )
* Description: Gets the default timezone used by all date/time functions in a script.
* Source code: ext/standard/data/php_date.c
*/
+
+date_default_timezone_set("UTC");
echo "*** Testing date_default_timezone_get() : error conditions ***\n";
--TEST--
Test date_default_timezone_set() function : error variations
---INI--
-date.timezone=UTC
--FILE--
<?php
/* Prototype : bool date_default_timezone_set ( string $timezone_identifier )
--TEST--
Test date_sun_info() function : error variations
---INI--
-date.timezone=UTC
--FILE--
<?php
/* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude )
--TEST--
Test date_sun_info() function : error variations - Pass unexpected values for time argument
---INI--
-date.timezone=UTC
--FILE--
<?php
/* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude )
* Description: Returns an array with information about sunset/sunrise and twilight begin/end.
* Source code: ext/standard/data/php_date.c
*/
+
+date_default_timezone_set("UTC");
echo "*** Testing date_sun_info() : usage variations ***\n";
--TEST--
Test date_sun_info() function : error variations - PAss unexepcted valuesfor latitude argument
---INI--
-date.timezone=UTC
--FILE--
<?php
/* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude )
* Description: Returns an array with information about sunset/sunrise and twilight begin/end.
* Source code: ext/standard/data/php_date.c
*/
+
+// supress date() function strict msgs
+error_reporting(E_ALL & ~E_STRICT);
echo "*** Testing date_sun_info() : usage variations ***\n";
--TEST--
Test date_sun_info() function : usage variations - Pass unexpected values for longitude argument
---INI--
-date.timezone=UTC
--FILE--
<?php
/* Prototype : array date_sun_info ( int $time , float $latitude , float $longitude )
* Description: Returns an array with information about sunset/sunrise and twilight begin/end.
* Source code: ext/standard/data/php_date.c
*/
+
+// supress date() function strict msgs
+error_reporting(E_ALL & ~E_STRICT);
echo "*** Testing date_sun_info() : usage variations ***\n";
echo "Basic test for date_sunrise() and date_sunset()\n";
-// supress date() function warning msgs
-error_reporting(E_ALL & ~E_WARNING);
+// supress date() function strict msgs
+error_reporting(E_ALL & ~E_STRICT);
echo date("D M d Y") . ', sunrise time : ' . date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n";
echo date("D M d Y") . ', sunset time : ' . date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n";