protected function normalizeDateTime($value)
    {
        try {
            if (is_int($value)) {
                //timestamp
                $value = new DateTime("@$value");
            } elseif (!$value instanceof DateTime) {
                $value = new DateTime($value);
            }
        } catch (\Exception $e) {
            throw new InvalidArgumentException('Invalid date string provided', $e->getCode(), $e);
        }

        return $value;
    }