php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52205 strtotime() fault dates grater than to 2010-06-12
Submitted: 2010-06-29 18:21 UTC Modified: 2010-06-30 10:09 UTC
From: vladzur at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3.2 OS: Ubuntu 10.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vladzur at gmail dot com
New email:
PHP Version: OS:

 

 [2010-06-29 18:21 UTC] vladzur at gmail dot com
Description:
------------
strtotime returns nothing when give dates grather than 2010-06-12

echo strtotime('2010-06-13') //nothing here!!!


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-29 18:31 UTC] rasmus@php.net
-Status: Open +Status: Bogus
 [2010-06-29 18:31 UTC] rasmus@php.net
php > echo strtotime('2010-06-13');
1276412400

works fine here on 5.3.2 Ubuntu.
 [2010-06-29 18:46 UTC] vladzur at gmail dot com
doesn't work this:

echo strtotime('2010/06/13)

echo strtotime('13/06/2010')
 [2010-06-30 10:09 UTC] salathe@php.net
They both work as expected for me:

php > echo phpversion();
5.3.2-1ubuntu4.2
php > var_dump(strtotime('2010/06/13'));
int(1276383600)  [note: timezone Europe/London]
php > var_dump(strtotime('13/06/2010'));
bool(false)      [note: expected result(1)]

(1) This format is not accepted, see http://php.net/datetime.formats.date If 
possible use date_create_from_format/DateTime::createFromFormat or an 
alternative format like 13-06-2010

If you get different results, could you please verify what they are rather than 
"doesn't work". Thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 08:01:30 2025 UTC