Bug #70691 [Opn]: strtotime to timestamp issue

From: Date: Mon, 12 Oct 2015 03:06:43 +0000
Subject: Bug #70691 [Opn]: strtotime to timestamp issue
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196538@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70691&edit=1 ID: 70691 User updated by: fengzbao at qq dot com Reported by: fengzbao at qq dot com Summary: strtotime to timestamp issue Status: Open Type: Bug Package: *Database Functions -Operating System: +Operating System: centos 6.5 32 PHP Version: 5.4.45 Block user comment: N Private report: N New Comment: add os information Previous Comments: ------------------------------------------------------------------------ [2015-10-12 03:05:36] fengzbao at qq dot com 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70691&edit=1

« previous php.bugs (#196538) next »