- Issue created by @klimp
- Merge request !127Issue #3443508: Reset default timezone regardless of return format. → (Open) created by klimp
I have multiple dates with different timezones attached to an entity. I also have a custom preprocess function hook_preprocess_smart_date_recurring_text_rule()
to add an extra variable to the smart_date_recurring_text_rule
theme. I noticed that when I am calling date_default_timezone_get()
in my preprocess function - it returns me the last non-default timezone I used for the date field instead of the default site timezone.
Rolling back to the default timezone is not happening for the string
return type - https://git.drupalcode.org/project/smart_date/-/blob/4.1.x/src/SmartDate...
- create an entity with the date field. Add a recurring date with the timezone different from the site default timezone
- implement a preprocess function hook_preprocess_smart_date_recurring_text_rule()
- call date_default_timezone_get()
in the custom prerocess function and verify that it returns the timezone which you set in the date field (UTC in my example), not the site default timezone
Roll back to the default timezone regardless of the return type (string or array)
https://git.drupalcode.org/project/smart_date/-/blob/4.1.x/src/SmartDate...
Active
4.1
Smart Date Recur