|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13789 strtotime wrong interpretation of GMT dates
Submitted: 2001-10-22 14:44 UTC Modified: 2001-10-27 13:47 UTC
From: cox at idecnet dot com Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: cox at idecnet dot com
New email:
PHP Version: OS:


 [2001-10-22 14:44 UTC] cox at idecnet dot com
// format got from a PostgreSQL datetime column type
$date = '2001-10-22 21:19:58+02';
$stamp = strtotime($date);
$conv = date('d/m/Y H:i:s', $stamp);
echo "$date\n$conv\n";

2001-10-22 21:19:58+02
22/10/2001 23:17:58

It is adding 2 hours and substracting 2 minutes in all the cases (tested with more $date values).

Tomas V.V.Cox


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-27 13:47 UTC]
Fixed in CVS

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun May 28 06:03:41 2023 UTC