[PHP] Sunset/Sunrise

2012-03-20 Thread Tedd Sperling
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.sperl...@gmail.com
http://sperling.com






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sunset/Sunrise

2012-03-20 Thread Andrew Ballard
On Tue, Mar 20, 2012 at 9:23 AM, Tedd Sperling tedd.sperl...@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.3320hl=ensll=42.57,-84.332sspn=0.023008,0.038581t=mz=8

http://maps.google.com/maps?q=42.57,-84.3320hl=ensll=42.554092,-84.324188sspn=0.736459,1.234589t=mz=15

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sunset/Sunrise

2012-03-20 Thread Tedd Sperling
On Mar 20, 2012, at 9:50 AM, Andrew Ballard wrote:

 On Tue, Mar 20, 2012 at 9:23 AM, Tedd Sperling tedd.sperl...@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.3320hl=ensll=42.57,-84.332sspn=0.023008,0.038581t=mz=8
 
 http://maps.google.com/maps?q=42.57,-84.3320hl=ensll=42.554092,-84.324188sspn=0.736459,1.234589t=mz=15
 
 Andrew

Andrew:

That's what I get for not checking it myself. I was assured by one of my 
students that was our correct lat/long. Boy, will he hear from me -- he's going 
to find his next assignment in China. :-)

Thanks,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sunset/Sunrise

2012-03-20 Thread Andrew Ballard
On Tue, Mar 20, 2012 at 6:00 PM, Tedd Sperling tedd.sperl...@gmail.com wrote:
 That's what I get for not checking it myself. I was assured by one of my 
 students that was our correct lat/long. Boy, will he hear from me -- he's 
 going to find his next assignment in China. :-)

 Thanks,

 tedd

That's the spirit! Truly world-class education!

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php