php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30745 Functions date_sunset() and date_sunrise() return incorrect timestamps.
Submitted: 2004-11-10 12:40 UTC Modified: 2005-02-10 15:35 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: assassin at pf dot pl Assigned: pajoye (profile)
Status: Closed Package: Date/time related
PHP Version: 5.0.2 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: assassin at pf dot pl
New email:
PHP Version: OS:

 

 [2004-11-10 12:40 UTC] assassin at pf dot pl
Description:
------------
Functions date_sunset() and date_sunrise() return incorrect timestamps.

Reproduce code:
---------------
$sunrise = date_sunrise(time(),SUNFUNCS_RET_TIMESTAMP);
$sunset = date_sunset(time(),SUNFUNCS_RET_TIMESTAMP);

$day_length = $sunset - $sunrise; 

echo($day_length); //This line shows number of minutes, not seconds.

echo date("Y m d G:i:s", $sunrise); //This line shows incorrect time.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-10 15:35 UTC] pajoye@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC