From d7c4f5ae397a1baef2681f29fc6d8dc1677b3d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 28 Sep 2024 16:49:39 +0200 Subject: [PATCH] set site timezone as default in event base transformer --- includes/activitypub/transformer/class-event.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/activitypub/transformer/class-event.php b/includes/activitypub/transformer/class-event.php index 893778f..03c9fd2 100644 --- a/includes/activitypub/transformer/class-event.php +++ b/includes/activitypub/transformer/class-event.php @@ -276,6 +276,16 @@ abstract class Event extends Post { return $template; } + /** By default set the timezone of the WordPress site. + * + * This is likely to be overwritten by the actual transformer. + * + * @return string The timezone string of the site. + */ + public function get_timezone(): string { + return wp_timezone_string(); + } + /** * Generic function that converts an WP-Event object to an ActivityPub-Event object. *