PHP 日付の加算

PHPで日付の加算をするサンプルです。

$dt = new DateTime();
$dt->setTimeZone(new DateTimeZone(‘Asia/Tokyo’));
$current_time = $dt->format(‘Y-m-d H:i:s’);
strtotime(“1 day”, strtotime($current_time);


Bookmark this on Yahoo Bookmark
Bookmark this on Google Bookmarks
Share on LinkedIn
LINEで送る
Pocket

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>