set site timezone as default in event base transformer
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 34s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 57s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 57s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 55s

This commit is contained in:
André Menrath 2024-09-28 16:49:39 +02:00
parent 2257e86f0f
commit d7c4f5ae39

View file

@ -276,6 +276,16 @@ abstract class Event extends Post {
return $template; 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. * Generic function that converts an WP-Event object to an ActivityPub-Event object.
* *