php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65765 createFromFormat('U') ignore current timezone
Submitted: 2013-09-26 11:25 UTC Modified: 2013-09-26 11:33 UTC
From: patrik at votocek dot cz Assigned:
Status: Closed Package: Date/time related
PHP Version: 5.5.4 OS: Linux x86_64
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: patrik at votocek dot cz
New email:
PHP Version: OS:

 

 [2013-09-26 11:25 UTC] patrik at votocek dot cz
Description:
------------
DateTime::createFromFormat('U', $time); ignore current timezone.

Test script:
---------------
<?php
$time = time();
var_dump(date('r', $time));
var_dump(\DateTime::createFromFormat('U', $time)->format('r'));


Expected result:
----------------
string(31) "Thu, 26 Sep 2013 13:17:37 +0200"
string(31) "Thu, 26 Sep 2013 13:17:37 +0200"

Actual result:
--------------
string(31) "Thu, 26 Sep 2013 13:17:37 +0200"
string(31) "Thu, 26 Sep 2013 11:17:37 +0000"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-26 11:33 UTC] patrik at votocek dot cz
-Status: Open +Status: Closed
 [2013-09-26 11:33 UTC] patrik at votocek dot cz
It's not bug it's feature...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC