Problem/Motivation

Currently, when a date is stored into search api it is converted to UTC properly, but never converted back properly.

This stems from getDateRangeFromOccurrenceDeltaIdentifier() where we get the UTC time and, without properly initializing a new daterange, tell it that it's timezone is something else. This can be remedied by passing the UTC timezone as the 3rd argument in \DateTime::createFromFormat.

Steps to reproduce

  1. Set up an index using occurrences
  2. Set up a view to display occurrence times
  3. Look at search results and see time is off (in my case by 4 hours - EDT)

Proposed resolution

Pass UTC timezone during initialization of the datetime, then convert it to the site's timezone.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nickdjm created an issue. See original summary.

  • nickdjm committed 3df1c1c0 on 1.0.x
    Resolve #3578625 "Date occurrence timezone fix"
    
nickdjm’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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