|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-10-12 03:06 UTC] fengzbao at qq dot com
-Operating System:
+Operating System: centos 6.5 32
[2015-10-12 03:06 UTC] fengzbao at qq dot com
[2015-10-12 03:29 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
-Package: *Database Functions
+Package: Date/time related
[2015-10-12 03:29 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 01:00:01 2026 UTC |
Description: ------------ strtotime transfet string to timestamp issue some problem. echo date('Y-m-d', strtotime('151011')); we see: 2015-10-12 this is wrong. and you can solve this case like this: echo date('Y-m-d', '20' . strtotime('151011')); Test script: --------------- echo date('Y-m-d', strtotime('151011')); Expected result: ---------------- 2015-10-12 Actual result: -------------- 2015-10-11