src/Factory/TimeToDateTimeFilterFactory.php
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var $serviceLocator FilterPluginManager */
        $parentLocator = $serviceLocator->getServiceLocator();

        $filter = new TimeToDateTime(
            $parentLocator->get('Config')['mpacustomdoctrinehydrator']['formats'][Locale::getDefault()]
        );

        return $filter;
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        /** @var $serviceLocator FilterPluginManager */
        $parentLocator = $serviceLocator->getServiceLocator();

        $filter = new TimeToDateTime(
            $parentLocator->get('Config')['mpacustomdoctrinehydrator']['formats'][Locale::getDefault()]
        );

        return $filter;
    }
Create service

@param  ServiceLocatorInterface $serviceLocator
@return TimeToDateTime