q2a / question2answer

Question2Answer is a free and open source platform for Q&A sites, running on PHP/MySQL.
http://www.question2answer.org/
GNU General Public License v3.0
1.63k stars 629 forks source link

Add capability to provide custom date when create post #891

Closed Chepheus closed 1 year ago

Chepheus commented 3 years ago

Hello, sorry for my English. I need this functionality to provide my custom date because of importing of data with predefining data.

svivian commented 3 years ago

Hi, I think a simpler solution is to add your post without the date, then update it manually. qa_post_create returns the ID of the new post so you can run a new query likeUPDATE ^posts SET created=$ WHERE id=#

Chepheus commented 3 years ago

I see, but I have a lot of data for question creating (about 4000+ questions) and insert one row and then update it. I think it's not optimal for my purpose.

Chepheus commented 3 years ago

What do you think about this PR? =)