|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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!!!
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 17:00:01 2025 UTC |
php > echo strtotime('2010-06-13'); 1276412400 works fine here on 5.3.2 Ubuntu.doesn't work this: echo strtotime('2010/06/13) echo strtotime('13/06/2010')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.