Problem/Motivation

The smart date module has its own full calendar preprocessor that is specifying dates with timezone offsets - which are no longer being handle the same way by fullcalendar view as of this commit:

commit 31ca685c9a256699a2b38df113bdafd4423eaf7e 
Author: Sally Young <git@justa.fish> 
Date: Mon Mar 8 16:13:05 2021 +0000
Issue #3202271: Render times in the site timezone instead of the browser timezone

Before without patch -> 4h date shift issue (assuming the site or user timezone is +0400) when using a custom time format string for the month view:

without patch

Proposed resolution

With patch -> no more shift issue:

with patch

Comments

KarinG created an issue. See original summary.

rellis’s picture

Here's the patch... Let us know if you want a merge request.

karing’s picture

PS - confirming that regular Drupal Date fields are rendering at the correct time in FullCalendar View module 5.1.1 and that makes sense as there is no fullcalendar view preprocess function for it.

  • mandclu committed ae31900 on 3.4.x authored by rellis
    Issue #3228423 by rellis, KarinG, mandclu: Compatibiliy fix re:...
mandclu’s picture

Version: 3.3.0 » 3.4.x-dev
Issue summary: View changes
Status: Active » Fixed

I appreciate you raising this issue. In my previous testing, I had identified that the issue is only present when using a custom time format string, which based on my testing today is still the case. Also, in your issue description you cite a 4h shift, but this will only be true for sites with a timezone of EDT, otherwise the shift will be equivalent to the site's offset from UTC. For example, I heard from a user who was complaining that am/pm were reverse in their calendar, and they were in New Zealand, so their offset was 12h. Removing the custom string solved their issue.

During testing I also identified some lingering issues related to timezones explicitly set for an events, but I'll capture those in a separate issue.

I've merged in your change, though at this point I'll likely roll it into the next 3.4.0 release, which I hope to be a stable release.

karing’s picture

@mandclu - awesome. Thank you! 3.4.x-dev is perfect 👍 People only need it when on the latest version of fullcalendar view module.

Ah yes - I forgot to mention we were using a Toronto site in this example so we did understand where the 4h came from. NZ reversing am/pm +/- 12h that's is funny :-)

Feel free to ping me on the other issue you are going to look at re: timezones - we're pretty well set up now to test/review. Though timezones will never be our favourite thing to work on 🙂

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.