From:             eclipsechasers2 at yahoo dot com
Operating system: Windows, Linux
PHP version:      5.2.10
PHP Bug Type:     Date/time related
Bug description:  Sunrise Problems around 91 degree zenith

Description:
------------
Script showing times for series of zeniths from 90.0 to 92.0 by 0.1 should
show time uniformly decreasing (earlier) as zenith gets larger. This is
true for most values. However, 91.1 shows a later time than 91.0, as does
91.2; this would happen only if earth changed its direction of rotation.

Reproduce code:
---------------
<?php
$gregyear = 2009; $gregmonth = 3; $gregday = 20;
$location = "San Francisco"; $latitude = 37.787; $longitude = -122.447;
$timezone = "America/Los_Angeles";
$gregmonthname =
JDMonthName(cal_to_jd(CAL_GREGORIAN,$gregmonth,1,2000),1);
$jd = gregoriantojd($gregmonth, $gregday, $gregyear);
  $weekday = jddayofweek($jd,0);
  echo "<b>$gregyear $gregmonthname $dd  - " . jddayofweek($jd,1) . " -
";
  echo "Latitude $latitude Longitude $longitude Time Zone $timezone
Location $location</b>\n";
  $ts = $gregyear . "-" . $gregmonth . "-" . $dd . " 06:00:00";
  $strts = strtotime($ts);
  $gmto = -8;
  for ($deg = 90; $deg <= 92; $deg += .1) {
    $sunris0 = date_sunrise($strts,SUNFUNCS_RET_TIMESTAMP, $latitude,
$longitude, $deg, $gmto);
    printf("<br>%02.1f %s\n",$deg,date("g:i:sa",$sunris0));
    }
?> 

Expected result:
----------------
Unsure of exact result (can't do these calculations in my head), but the
times on each line should be earlier than the line above.

Actual result:
--------------
2009 March - Friday - Latitude 37.787 Longitude -122.447 Time Zone
America/Los_Angeles Location San Francisco
90.0 7:28:40am
90.1 7:28:05am
90.2 7:27:30am
90.3 7:26:56am
90.4 7:26:21am
90.5 7:25:46am
90.6 7:25:11am
90.7 7:24:37am
90.8 7:24:02am
90.9 7:23:28am
91.0 7:22:53am
91.1 7:23:52am ** Either these 2 values, or the 2 above, are wrong.
91.2 7:23:18am
91.3 7:22:43am
91.4 7:22:08am
91.5 7:21:34am
91.6 7:20:59am
91.7 7:20:25am
91.8 7:19:51am
91.9 7:19:16am
92.0 7:18:42am

-- 
Edit bug report at http://bugs.php.net/?id=49558&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=49558&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=49558&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=49558&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=49558&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=49558&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=49558&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=49558&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=49558&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=49558&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=49558&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=49558&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=49558&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=49558&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=49558&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=49558&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=49558&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=49558&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=49558&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=49558&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=49558&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=49558&r=mysqlcfg

Reply via email to