Bug #53740 [Opn]: DateTime, create_date, strtotime - wrong result on realtive date time string
| From: | metwo at gmx dot net | Date: | Thu, 13 Jan 2011 16:12:53 +0000 |
| Subject: | Bug #53740 [Opn]: DateTime, create_date, strtotime - wrong result on realtive date time string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157890@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53740&edit=1
ID: 53740
User updated by: metwo at gmx dot net
Reported by: metwo at gmx dot net
Summary: DateTime, create_date, strtotime - wrong result on
realtive date time string
Status: Open
Type: Bug
Package: Date/time related
Operating System: Linux 2.6.36.3 x86_64
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Expected and actual result relative to current date/time - 2011-01-13
17:12
Previous Comments:
------------------------------------------------------------------------
[2011-01-13 17:10:44] metwo at gmx dot net
Description:
------------
parsing of "midnight first day last month" returns a wrong result in php
5.3.5 (worked correct in php 5.3.2)
Test script:
---------------
<?php
print_r(date_create('midnight first day last month'));
print date('Y-m-d H:i:s', strtotime('midnight first day last month'));
Expected result:
----------------
DateTime Object
(
[date] => 2010-12-01 00:00:00
[timezone_type] => 3
[timezone] => Europe/Berlin
)
2010-12-01 00:00:00
Actual result:
--------------
DateTime Object
(
[date] => 2010-12-14 00:00:00
[timezone_type] => 3
[timezone] => Europe/Berlin
)
2010-12-14 00:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53740&edit=1