Date: 08/31/01
- Next message: sander <email protected>: "[PHP-DEV] Bug #10519 Updated: $HTTP_COOKIE_VARS spoofing"
- Previous message: sander <email protected>: "[PHP-DEV] Bug #13081 Updated: typo in German translation of Image-functions"
- Next in thread: schnitten <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Maybe reply: schnitten <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Maybe reply: schnitten <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Maybe reply: derick <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 10694
Updated by: sander
Reported By: schnitten <email protected>
Status: Assigned
Bug Type: Date/time related
Operating System: Redhat 6.2
PHP Version: 4.0.4
Assigned To: derick
New Comment:
Status after almost three months???
Previous Comments:
------------------------------------------------------------------------
[2001-05-07 04:23:18] derick <email protected>
Assigning to myself
------------------------------------------------------------------------
[2001-05-07 01:50:21] schnitten <email protected>
first of all:
I use php 4.0.1pl2 and don't have the possibility to upgrade. Please verify with latest version.
I tried to add 12 months to a given timestamp and figured out that mktime() doesn't include a 29th February into its calculations. Effect is, that following code doesn't jump forward 1 year during each loop. Every leap year 1 day gets lost!
$a = mktime(0,0,0,1,1,1970);
for ($i=0; $i<20; $i++) {
$a = mktime(0,0,3600 +$a,1+12,1,1970);
$b = date("d-m-Y", $a);
print "Date: $b<br>";
}
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=10694&edit=1
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: sander <email protected>: "[PHP-DEV] Bug #10519 Updated: $HTTP_COOKIE_VARS spoofing"
- Previous message: sander <email protected>: "[PHP-DEV] Bug #13081 Updated: typo in German translation of Image-functions"
- Next in thread: schnitten <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Maybe reply: schnitten <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Maybe reply: schnitten <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Maybe reply: derick <email protected>: "[PHP-DEV] Bug #10694 Updated: mktime leap year bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

