Skip to content

Commit 84b4bae

Browse files
committed
feature: get current date time method
1 parent 983ef5e commit 84b4bae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Helpers/DateTimeHelper.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,4 +344,11 @@ public static function wp_timezone()
344344

345345
return new DateTimeZone(self::wp_timezone_string());
346346
}
347+
348+
public function getCurrentDateTime()
349+
{
350+
$dateTime = new DateTime('now', self::wp_timezone());
351+
352+
return $dateTime->format($this->_currentFormat);
353+
}
347354
}

0 commit comments

Comments
 (0)