code: public static function cast($datetime)
      {
          return $datetime instanceof self ?
                  $datetime :
                  new self($datetime->format(self::ISO8601), $datetime->getTimezone());
      }
docs: Faz o "cast" de \DateTime para p13\util\datetime\DateTime
  @param OriginalDateTime $datetime
  @return DateTime