From 4ff31c6b45580c7a0d8b3355f51625869a447d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Sat, 28 Sep 2024 19:52:48 +0200 Subject: [PATCH] add timezone for the events calendar --- .../transformer/class-the-events-calendar.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/activitypub/transformer/class-the-events-calendar.php b/includes/activitypub/transformer/class-the-events-calendar.php index eea12ac..7d6eb1a 100644 --- a/includes/activitypub/transformer/class-the-events-calendar.php +++ b/includes/activitypub/transformer/class-the-events-calendar.php @@ -197,6 +197,17 @@ final class The_Events_Calendar extends Event { return $location; } + /** 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 $this->tribe_event->timezone; + } + + /** * Extend the default event transformers to_object function. *