<?php

namespace ShopManagerPro\Shared\Utils;

class Time {
	public static function mySqlDateTimeToUTCISO8601(string $dateTime) {
		$dateTime = str_replace(' ', 'T', $dateTime);

		return $dateTime.'Z';
	}

	public static function mySqlDateTimeToPHPDateTime(string $dateTime) {
		return new \DateTime(self::mySqlDateTimeToUTCISO8601($dateTime));
	}
}
