Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_oe_whitelabel_starter_event_preprocess_date disregards site timezone #234

Closed
drishu opened this issue Sep 19, 2023 · 0 comments · Fixed by #286
Closed

_oe_whitelabel_starter_event_preprocess_date disregards site timezone #234

drishu opened this issue Sep 19, 2023 · 0 comments · Fixed by #286

Comments

@drishu
Copy link
Contributor

drishu commented Sep 19, 2023

$dates->get('start_date') and $dates->get('end_date') have timezone set to UTC, but the sites have Europe/Brussles (as per php timezone set on server) when installed.
The core formatter handles this by fetching the timezone, I think we should do the same, something like
\Drupal::config('system.date')->get('timezone.default') and also account for users timezone (will be null if not allowed or not set so we can check for that).
Steps to reproduce:

  • install oe_whitelabel
  • create an event, set start date with His 00:00:00 and end date with his 23:59:59
  • visit /nodes
  • you will see the start date 1 day earlier than set

The issue becomes bigger if we would display the hour (ex requirement for teaser on one of the subsites)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant