Doc #62626 [Fbk->NoF]: not showing proper value

From: Date: Mon, 18 Feb 2013 00:35:52 +0000
Subject: Doc #62626 [Fbk->NoF]: not showing proper value
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9552@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62626&edit=1

 ID:               62626
 Updated by:       php-bugs@lists.php.net
 Reported by:      abhilashdas at gmail dot com
 Summary:          not showing proper value
-Status:           Feedback
+Status:           No Feedback
 Type:             Documentation Problem
 Package:          Date/time related
 Operating System: win 7
 PHP Version:      5.4.5

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2012-07-23 13:27:52] fa@php.net

Works for me on 5.4.5/Debian.

Have you set your timezone? e.g. with 

date_default_timezone_set("Europe/Berlin");

------------------------------------------------------------------------
[2012-07-21 04:39:47] abhilashdas at gmail dot com

Description:
------------
---
From manual page: http://www.php.net/datetime.diff#refsect1-datetime.diff-
returnvalues
---

$datetime1 = date_create('2009-10-11');
$datetime2 = date_create('2009-10-13');
$interval = date_diff($datetime1, $datetime2);
echo $interval->format('%R%a days');

This is suppose to give me +2 as out put. But I am getting +6015 day.

Not sure it is a bug or some setting problem.
My machine is win7 and timezone is +5:30


Test script:
---------------
$datetime1 = date_create('2009-10-11');
$datetime2 = date_create('2009-10-13');
$interval = date_diff($datetime1, $datetime2);
echo $interval->format('%R%a days');

Expected result:
----------------
+2 days

Actual result:
--------------
+6015 days


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62626&edit=1


Thread (3 messages)

« previous php.doc.bugs (#9552) next »