The strtotime function has a strange problem.
Var_dump (strtotime ('20140901'); // output bool (false) var_dump (strtotime ('20160901'); // output int (1441185010)
It's strange, why are the two results different?
Reply to discussion (solution)
From: http://yushine.iteye.com/blog/775407From_unixtime to convert UNIX timestamps to standard TimeUnix_timestamp convert standard Time to UNIX timestamp//query statement you cannot use the Strtotime () function! But you can use the
PHP date query function code
Date_default_timezone_set ('prc'); // Default time zone
Echo "today:", date ("Y-m-d", time ()),"";
Echo "today:", date ("Y-m-d", strtotime ("18 Jun 2008 ")),"";
Echo
This morning, I asked a question about the mysql database storage time. I suddenly thought about the date and time in php and mysql. In a project, we often use multiple expressions for the same time. For example, I used int (11) to store unix
In PHP + MYSQL website development, the time issue occurs. in PHP + MYSQL website development, how does one deal with the time issue?
PHP and MYSQL do not directly compare the DateDiff function like ASP and MSSQL. MYSQL5.0 supports DateDiff, but
In PHP + MYSQL website development, how does one deal with time issues?
In PHP + MYSQL website development, how does one deal with time issues?
PHP and MYSQL do not directly compare the DateDiff function like ASP and MSSQL. MYSQL5.0 supports
Use php to get detailed information about the timestamp of today, tomorrow, and yesterday. Use php to get the time. today, tomorrow, yesterday, the timestamp 2013-06-1? Phpecho today :. date (Y-m-d ). br; echo yesterday :. date (Y-m-d, strtotime
Get a timestamp of 0 points$time = strtotime (Date (' YMD '));
Get a timestamp of 24 O ' Day today$time = strtotime (Date (' YMD ')) + 86400;
Time stamp of the last day$date = Strtotime ('-1 days ');//获取当天的年份$y= date("Y"); //获取当天的月份$m= date("m");
1. unix_timestampConverts a time to a timestamp. Convert data of the date type to the timestamp formatThe timestamp of the current time is used by default.Mysql> select unix_timestamp ();+ ------ +| Unix_timestamp () |+ ------ +| 1, 1436775578 |+ ---
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.