月の初日の 00:00:00 のタイムスタンプを取得しようとしています。
たとえば、2012 年 1 月 1 日 00:00:00 のタイムスタンプ
私はこれをやっています:
$test_month = time(); // Seconds
$test_month = date('M', $test_month); // This month
$test_month = strtotime($test_month); // Timestamp of this month
echo $test_month;
これは、月の始まりではなく、その月の現在の日のゼロ時間を返しています。
助言がありますか?