updated plugin Easy Digital Downloads version 3.1.4

This commit is contained in:
2023-07-19 21:08:59 +00:00
committed by Gitium
parent a7f6efbebb
commit 9a42dc17d2
109 changed files with 12446 additions and 5563 deletions

View File

@ -112,4 +112,18 @@ final class Date extends \Carbon\Carbon {
public function getWPTimestamp() {
return $this->getTimestamp() + EDD()->utils->get_gmt_offset();
}
/**
* Converts a localized date string to UTC.
*
* @since 3.1.4
* @param $format string
* @return string
*/
public function get_utc_from_local( $format = 'Y-m-d H:i:s' ) {
$utc_timezone = new \DateTimeZone( 'utc' );
$this->setTimezone( $utc_timezone );
return $this->format( $format );
}
}