Re: Sunset/Sunrise
| From: | Andrew Ballard | Date: | Tue, 20 Mar 2012 13:50:59 +0000 |
| Subject: | Re: Sunset/Sunrise | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317141@lists.php.net to get a copy of this message | ||
On Tue, Mar 20, 2012 at 9:23 AM, Tedd Sperling <tedd.sperling@gmail.com> wrote:
> Hi gang:
>
> What's wrong with this?
>
> echo date("D M d Y"). ', sunrise time : ' .date_sunrise(time(),
> SUNFUNCS_RET_STRING, 42.57, 84.3320, 90, -5);
> echo('<br>');
> echo date("D M d Y"). ', sunset time : ' .date_sunset(time(),
> SUNFUNCS_RET_STRING, 42.57, 84.3320, 90, -5);
>
> It gives exactly the wrong time -- Sunset is reported as Sunrise and vice versa. What's
> up?
>
> Thanks,
>
> tedd
tedd,
I think you used the incorrect longitude. Did you want a location in
northern China (as you entered above) or near Dansville, MI (in which
case I believe your longitude above should be negative rather than
positive)?
http://maps.google.com/maps?q=42.57,84.3320&hl=en&sll=42.57,-84.332&sspn=0.023008,0.038581&t=m&z=8
http://maps.google.com/maps?q=42.57,-84.3320&hl=en&sll=42.554092,-84.324188&sspn=0.736459,1.234589&t=m&z=15
Andrew