Bug #13789: strtotime wrong interpretation of GMT dates

From: Date: Mon, 22 Oct 2001 18:44:11 +0000
Subject: Bug #13789: strtotime wrong interpretation of GMT dates
Groups: php.dev 
Request: Send a blank email to php-dev+get-68721@lists.php.net to get a copy of this message
From:             cox@idecnet.com
Operating system: Linux
PHP version:      4.0.6
PHP Bug Type:     Date/time related
Bug description:  strtotime wrong interpretation of GMT dates

<?php
// 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";
?>

Output:
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

-- 
Edit bug report at: http://bugs.php.net/?id=13789&edit=1



Thread (3 messages)

« previous php.dev (#68721) next »