Fix published date and author for topics created via wp-discourse-embed plugin

Hi, I tried your script but removed this part:

author_username = raw_doc.at('meta[@name="author"]')
if author_username.present?
  begin
    author = User.where(username_lower: author_username[:content].strip).first
    if author.present? && author.username_lower != topic.user.username_lower
      PostOwnerChanger.new(post_ids: [topic.first_post.id], topic_id: topic.id, new_owner: User.find_by(username_lower: author.username_lower), acting_user: User.find_by(username_lower: "system"), skip_revision: true).change_owner!
    end
  rescue
    # handle error
  end
end

Because I only wanted to update the Discourse posts dates.
The script told me: 61 posts fetched and corrected! but the dates weren’t changed.

Any idea how to make this work?