Automattic\WooCommerce\Admin\DateTimeProvider

CurrentDateTimeProvider{}WC 1.0

Current DateTime Provider.

Uses the current DateTime.

No Hooks.

Usage

$CurrentDateTimeProvider = new CurrentDateTimeProvider();
// use class methods

Methods

  1. public get_now()

Code of CurrentDateTimeProvider{} WC 6.6.1

class CurrentDateTimeProvider implements DateTimeProviderInterface {
	/**
	 * Returns the current DateTime.
	 *
	 * @return DateTime
	 */
	public function get_now() {
		return new \DateTime();
	}
}