php strtotime给出默认日期
问题描述:
我想将日期转换为其他格式,但显示默认日期。
I want to convert date into another format but its shows default date.
$date ='2050-12-12 00:00:00';
echo $product_expire_date = date('Ymd', strtotime($date));
它显示默认日期19700101。
It shows the default date 19700101.
答
timestamp
的有效范围通常来自 Fri,13 Dec 1901 20:45:54 UTC
to Tue,19 Jan 2038 03:14:07 UTC
。 (这些是对应于32位有符号整数的最小值和最大值的日期。)
The valid range of a timestamp
is typically from Fri, 13 Dec 1901 20:45:54 UTC
to Tue, 19 Jan 2038 03:14:07 UTC
. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)