setTimezone(new DateTimeZone('Europe/Moscow')); $hour = (int) $dt->format('G'); $dayOfTheWeek = (int) $dt->format('w'); if ( ($hour >= 9) && ($hour < 18) && ($dayOfTheWeek !== 0) && ($dayOfTheWeek !== 6) ) { echo " "; } else { echo " "; } ?>