To modify the time format:
Date ("Y-m-d", Strtotime ($list [' pubdate ']));
Learn to explain: put time into strtotime after the time stamp with date () conversion format. The following two functions are written
PHP Strtotime () function
The strtotime () function resolves the date-time description of any English text to a Unix timestamp.
Grammar
Strtotime (time,now) parameter description
Time to specify the string to parse.
Now is the time stamp used to calculate the return value. If this argument is omitted, the current time is used.
The PHP date () function formats the timestamp as a more readable date and time.
Grammar
Date (format,timestamp) parameter description
Format required. Specify the format of the timestamp.
Timestamp optional. Specify the time stamp. The default is the current date and time.
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.