| bhlonewolf Senior Member
 
  
 
 Joined: March 29 2007
 Online Status: Offline
 Posts: 198
 | 
          For kicks I was playing around with calculating some dusk/sunset stuff (in this case, minutes between sunset and dusk), but running into some issues.  I wrote the following to calculate the difference, but no matter what I do, I get the same result:
           | Posted: November 04 2007 at 18:22 | IP Logged |   |  
           | 
 |  
 ph_secondsafter(
 ph_getsuntime( date("12-21-2007"), 2),
 ph_getsuntime( date("12-21-2007"), 4)
 ) / 60
 
 I can limit the problem to this:
 
 ph_getsuntime( date("12-21-2007"), 2)
 
 When I call ph_getsuntime and pass in today(), it works, but when I try passing in a date("") as shown above, I always get the same result returned.  So, if I pass in 6 instead of 12 for the month, I get sunset of just after 5pm, etc.  Am I doing something wrong here?  The date() function seems to work fine, so either I'm doing something wrong or there's something up with ph_getsuntime ... thx!
 
 Brian
 
 
 Edited by bhlonewolf - November 04 2007 at 18:26
 |