public function transform($dateTime)
    {
        if ($dateTime === null || trim($dateTime) == '') {
            return '';
        }

        if (!$dateTime instanceof \DateTime) {
            throw new TransformationFailedException('Expected a \DateTime.');
        }

        $dateTime = clone $dateTime;
        if ($this->inputTimezone !== $this->outputTimezone) {
            try {
                $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone));
            } catch (\Exception $e) {
                throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e);
            }
        }

        // This is passed to the concrete5 DateTime widget, so the format
        // can be anything that can be parsed with the default PHP datetime
        // functions.
        return $dateTime->format('Y-m-d H:i:s');
    }