setting the created date if not already set