@@ -49,11 +49,11 @@ public function to_object() {
4949 $ object ->set_type ( 'Note ' );
5050
5151 $ published = \strtotime ( $ comment ->comment_date_gmt );
52- $ object ->set_published ( \gmdate ( ' Y-m-d\TH:i:s\Z ' , $ published ) );
52+ $ object ->set_published ( \gmdate ( ACTIVITYPUB_DATE_TIME_RFC3339 , $ published ) );
5353
5454 $ updated = \get_comment_meta ( $ comment ->comment_ID , 'activitypub_comment_modified ' , true );
5555 if ( $ updated > $ published ) {
56- $ object ->set_updated ( \gmdate ( ' Y-m-d\TH:i:s\Z ' , $ updated ) );
56+ $ object ->set_updated ( \gmdate ( ACTIVITYPUB_DATE_TIME_RFC3339 , $ updated ) );
5757 }
5858
5959 $ object ->set_content_map (
@@ -302,7 +302,7 @@ public function get_updated() {
302302 $ published = \get_comment_meta ( $ this ->item ->comment_ID , 'activitypub_comment_published ' , true );
303303
304304 if ( $ updated > $ published ) {
305- return \gmdate ( ' Y-m-d\TH:i:s\Z ' , $ updated );
305+ return \gmdate ( ACTIVITYPUB_DATE_TIME_RFC3339 , $ updated );
306306 }
307307
308308 return null ;
@@ -314,7 +314,7 @@ public function get_updated() {
314314 * @return string The published date of the comment.
315315 */
316316 public function get_published () {
317- return \gmdate ( ' Y-m-d\TH:i:s\Z ' , \strtotime ( $ this ->item ->comment_date_gmt ) );
317+ return \gmdate ( ACTIVITYPUB_DATE_TIME_RFC3339 , \strtotime ( $ this ->item ->comment_date_gmt ) );
318318 }
319319
320320 /**
0 commit comments