note 111399 added to function.date-sun-info

From: Date: Fri, 15 Feb 2013 20:12:18 +0000
Subject: note 111399 added to function.date-sun-info
Groups: php.notes php.notes 
Request: Send a blank email to php-notes+get-193650@lists.php.net to get a copy of this message
While the bug has been fixed in future versions, be aware that in some PHP versions around 5.1-5.2 have a situation where the latitude and longitude are read in reverse. This will cause the output to be for a completely different location on Earth. array date_sun_info ( int $time , float $latitude , float $longitude ) wrongly becomes array date_sun_info ( int $time , float $longitude, float $latitude) Make sure you do a double check before deploying this function to a live state, and verify against date_sunrise() or date_sunset() that you don't have to put the location's real longitude in the function's latitude parameter and vice versa. Just to reiterate, THIS HAS BEEN FIXED! But in some versions of PHP that may be out there on shared hosting solutions, you may be getting odd results, and this will most likely be the reason. I hope this helps others that are searching for a solution quickly. ---- Server IP: 69.147.83.199 Probable Submitter: 81.136.243.12 ---- Manual Page -- http://php.net/manual/en/function.date-sun-info.php Edit -- https://master.php.net/note/edit/111399 Del: integrated -- https://master.php.net/note/delete/111399/integrated Del: useless -- https://master.php.net/note/delete/111399/useless Del: bad code -- https://master.php.net/note/delete/111399/bad+code Del: spam -- https://master.php.net/note/delete/111399/spam Del: non-english -- https://master.php.net/note/delete/111399/non-english Del: in docs -- https://master.php.net/note/delete/111399/in+docs Del: other reasons-- https://master.php.net/note/delete/111399 Reject -- https://master.php.net/note/reject/111399 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#193650) next »