I wrote a test script for this and compared the output of the test script
with the output from the earlier posted class method.

Really strange is that the test script will have the same result as the
32bit machines (the correct one).
Maybe an memory managment problem within classes? Or any other ideas?

> Output values here 32bit linux machine:
> 
> :1:4
> :2004/4/-2 : 1080518400:
> :1:2
> :2004/6/0 : 1085961600:
> :1:6
> :2004/05/-4 : 1082937600:
> :1:6
> :2004/05/-4 : 1082937600:
> 
> 
> 
> output values 64 bit itanium2:
> 
> :1:4
> :2004/4/-2 : 1080694800:
> :1:2
> :2004/6/0 : 1085965200:
> :1:6
> :2004/05/-4 : 1083286800:
> :1:6
> :2004/05/-4 : 1083286800:

<?php
$t1 = mktime(2,0,0,4,-2,2004);
$t1a = mktime(2,0,0,3,29,2004);
$t2 = mktime(2,0,0,6,0,2004);
$t2a = mktime(2,0,0,5,31,2004);
$t3 = mktime(2,0,0,5,-4,2004);
$t3a = mktime(2,0,0,4,26,2004);
echo '2004/4/-2 : ' . $t1 . ' : ' . $t1a . "<br />\n";
echo '2004/6/+0 : ' . $t2 . ' : ' . $t2a . "<br />\n";
echo '2004/5/-4 : ' . $t3 . ' : ' . $t3a . "<br />\n";
?>


Results:

2004/4/-2 : 1080522000 : 1080522000
2004/6/+0 : 1085965200 : 1085965200
2004/5/-4 : 1082941200 : 1082941200

depending on timezone settings there might be a difference of 3600 seconds
(for my test machines)
but this does not explain the difference of 2 days within the phpgroupware
datetime class.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to