简体   繁体   中英

What is wrong with php strtotime

$d = '20-04-2001';
echo date('Y-m-d',strtotime($d));

output 2025-09-22

it think it might version problem currently using PHP Version 4.4.6

strtotime parse date in specific formats only. You can see http://php.net/manual/en/datetime.formats.date.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM