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

 ID:                 60960
 Updated by:         der...@php.net
 Reported by:        robertosuursoo at yahoo dot com dot br
 Summary:            Wrong number of days.
-Status:             Not a bug
+Status:             Assigned
 Type:               Bug
 Package:            Date/time related
 Operating System:   Ubuntu 11.04 64bits
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

This is a bug, it should show 1.


Previous Comments:
------------------------------------------------------------------------
[2012-02-03 14:10:36] robertosuursoo at yahoo dot com dot br

The function call worked perfectly and solved the problem!

date_default_timezone_set('UTC');

Thank you very much!

------------------------------------------------------------------------
[2012-02-03 13:43:32] robertosuursoo at yahoo dot com dot br

Thanks a lot!

------------------------------------------------------------------------
[2012-02-03 00:50:52] ahar...@php.net

Yep, this happens with the Brazil/East time zone, so it's just crossing a DST 
boundary: if you look at $interval->h on the last interval, it's 23 hours from 
midnight on the 21st to midnight on the 22nd and therefore not a full day.

------------------------------------------------------------------------
[2012-02-02 22:04:47] ras...@php.net

Unable to reproduce here as well with PHP 5.3.10. Which timezone are you using? 
Most likely DST-related.

------------------------------------------------------------------------
[2012-02-02 21:42:58] anon at anon dot anon

Obviously some wretched daylight savings issue. Call:
date_default_timezone_set('UTC');
It's the only way to make any programming language's date handling sane.

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=60960


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

Reply via email to