Bug #64316 [Opn->Nab]: function date not returning correct value for short int

From: Date: Wed, 27 Feb 2013 21:48:39 +0000
Subject: Bug #64316 [Opn->Nab]: function date not returning correct value for short int
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-177447@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64316&edit=1

 ID:                 64316
 Updated by:         rasmus@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


Thread (2 messages)

« previous php.bugs (#177447) next »