public static function createHighPrecision($time = null)
    {
        $dateTime = \DateTime::createFromFormat('U.u', $time ?: self::getMicrotime());
        
        $dateTime->setTimeZone(new \DateTimeZone(date_default_timezone_get()));
        
        return $dateTime;
    }
public static function createHighPrecision($time = null)
    {
        $dateTime = \DateTime::createFromFormat('U.u', $time ?: self::getMicrotime());
        
        $dateTime->setTimeZone(new \DateTimeZone(date_default_timezone_get()));
        
        return $dateTime;
    }
public static function createHighPrecision ( $ time = null ) { $ dateTime = \ DateTime :: createFromFormat ( 'U.u' , $ time ? : self :: getMicrotime ( ) ) ; $ dateTime -> setTimeZone ( new \ DateTimeZone ( date_default_timezone_get ( ) ) ) ; return $ dateTime ; }
Creates a new DateTime object with milliseconds resolution.

Usually `new \Datetime()` does not contain milliseconds so you need a method like this.

@param bool $time optional in seconds. floating point allowed.

@return \DateTime
Creates a new DateTime object with milliseconds resolution .