<?php
/**
* Created by PhpStorm.
* User: admin
* Date: 2018/4/18
* Time: 10:36
*/
date('Y-m-d H:i:s',strtotime('+2 month'));
//获取当前时间过一个月的时间,以时间戳格式显示
strtotime(date('Y-m-d H:i:s',strtotime('+1 month')));
//以下是年,月,周,天,时,分秒的用法
date("Y-m-d H:i:s", strtotime(" +2 year"));
date("Y-m-d H:i:s", strtotime(" +2 month"));
date("Y-m-d H:i:s", strtotime(" +2 week"));
date("Y-m-d H:i:s", strtotime(" +2 day"));
date("Y-m-d H:i:s", strtotime(" +2 hour"));
date("Y-m-d H:i:s", strtotime(" +2 minute"));
date("Y-m-d H:i:s", strtotime(" +2 second"));