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

 ID:                 64316
 Updated by:         ras...@php.net
 Reported by:        ff at darkpenguin dot com dot br
 Summary:            function date not returning correct value for short
                     int
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Date/time related
 Operating System:   OpenSuse 12.1
 PHP Version:        5.3.22
 Block user comment: N
 Private report:     N

 New Comment:

America/Sao_Paulo is not UTC so it couldn't possibly output 00:00:24


Previous Comments:
------------------------------------------------------------------------
[2013-02-27 21:34:04] ff at darkpenguin dot com dot br

Description:
------------
---
>From manual page: 
>http://www.php.net/function.date#refsect1-function.date-description
---

Function date is not formatting time correctly when used with 
date_default_timezone_set and small integers.

Test script:
---------------
print date('H:i:s',24);

// this should and do print 00:00:24, but when I do this: 

date_default_timezone_set('America/Sao_Paulo');
print date('H:i:s',24);

// this prints 21:00:24


Expected result:
----------------
On the first "print date" I expect and get the result 00:00:24, on the second 
print I get 21:00:24 where I expected the same result before.



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



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

Reply via email to