WordPress at Your Fingertips
function is not described

WC_DateTime::setTimezone() public WC 1.0

Set timezone.

{} It's a method of the class: WC_DateTime{}

No Hooks.

Return

DateTime.

Usage

$WC_DateTime = new WC_DateTime();
$WC_DateTime->setTimezone( $timezone );
$timezone(DateTimeZone) (required)
DateTimeZone instance.

Code of WC_DateTime::setTimezone() WC 5.9.0

public function setTimezone( $timezone ) {
	$this->utc_offset = 0;
	return parent::setTimezone( $timezone );
}