get time ISO 8601 wordpress
// Step 1: Get the current time in WordPress
$current_time = current_time('mysql');
// Step 2: Create a DateTime object using the current time
$date_time_object = new DateTime($current_time);
// Step 3: Get the ISO 8601 formatted date and time string
$iso_8601_time = $date_time_object->format('c');