<?php /*$original = date_default_timezone_set( 'Europe/Berlin'); $WordPress = date_default_timezone_set('UTC'); $tz = timezone_open( 'Asia/Tokyo' ); $date = date_create( '2025-07-30 22:30:00', $tz ); $thisyear = (int) date_format( $date, 'Y' ); $thismonth = (int) date_format( $date, 'm' ); $unixmonth = mktime( 0, 0, 0, $thismonth, 1, $thisyear ); // if set Europe/Berlin 1751320800 (+02:00) $last_day = gmdate( 't', $unixmonth ); var_dump($unixmonth, $thismonth, $last_day, $WordPress);*/ $date = strtotime( '2025-07-31 23:59:59' ); $year = date( 'Y', $date ); $month = date( 'm', $date ); $string = $year . '-' . $month . '-' . '01 00:00:00UTC'; $unixmonth = strtotime( $string ); $last_day = date( 't', $date ); var_dump( $unixmonth, $last_day ); ?>
You have javascript disabled. You will not be able to edit any code.