Home > Backend Development > PHP Tutorial > Laravel时间函数问题

Laravel时间函数问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:11:10
Original
1279 people have browsed it

Laravel时间函数问题,
比如现在的时间是:2016-04-21 14:53:20
我想显示30天后的那一天的最后一秒,就是2016-05-21 23:59:59
应该怎么做呢?

回复内容:

Laravel时间函数问题,
比如现在的时间是:2016-04-21 14:53:20
我想显示30天后的那一天的最后一秒,就是2016-05-21 23:59:59
应该怎么做呢?

$time = strtotime('2016-04-21 14:53:20');
echo date('Y-m-d 23:59:59',strtotime('+1 month',$time));
Copy after login

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template