@@ -49,11 +49,11 @@ public function to_object() {
49
49
$ object ->set_type ( 'Note ' );
50
50
51
51
$ 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 ) );
53
53
54
54
$ updated = \get_comment_meta ( $ comment ->comment_ID , 'activitypub_comment_modified ' , true );
55
55
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 ) );
57
57
}
58
58
59
59
$ object ->set_content_map (
@@ -302,7 +302,7 @@ public function get_updated() {
302
302
$ published = \get_comment_meta ( $ this ->item ->comment_ID , 'activitypub_comment_published ' , true );
303
303
304
304
if ( $ updated > $ published ) {
305
- return \gmdate ( ' Y-m-d\TH:i:s\Z ' , $ updated );
305
+ return \gmdate ( ACTIVITYPUB_DATE_TIME_RFC3339 , $ updated );
306
306
}
307
307
308
308
return null ;
@@ -314,7 +314,7 @@ public function get_updated() {
314
314
* @return string The published date of the comment.
315
315
*/
316
316
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 ) );
318
318
}
319
319
320
320
/**
0 commit comments