WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports

TimeInterval::convert_local_datetime_to_gmt() public WC 1.0

Converts local datetime to GMT/UTC time.

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

No Hooks.

Return

DateTime. Nothing.

Usage

$result = TimeInterval::convert_local_datetime_to_gmt( $datetime_string );
$datetime_string(string) (required)
String representation of local datetime.

Code of TimeInterval::convert_local_datetime_to_gmt() WC 5.2.2

<?php
public static function convert_local_datetime_to_gmt( $datetime_string ) {
	$datetime = new \DateTime( $datetime_string, new \DateTimeZone( wc_timezone_string() ) );
	$datetime->setTimezone( new \DateTimeZone( 'GMT' ) );
	return $datetime;
}