Seeing that the date reflected in wordpress admin is showing comment_date rather than what we are setting comment_date_gmt. When comment_date is not passed the current datetime is used instead.
It is recommended in the docs when setting comment_date manually to also set comment_date_gmt which we have been doing.
https://developer.wordpress.org/reference/functions/wp_insert_comment/
Confirmed locally and in the admin that our comment created_at datetime is being set for both fields.
Seeing that the date reflected in wordpress admin is showing
comment_date
rather than what we are settingcomment_date_gmt
. Whencomment_date
is not passed the current datetime is used instead. It is recommended in the docs when settingcomment_date
manually to also setcomment_date_gmt
which we have been doing. https://developer.wordpress.org/reference/functions/wp_insert_comment/Confirmed locally and in the admin that our comment
created_at
datetime is being set for both fields.