Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-8284

Views 3: Event Dates and Timezone

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.2
    • Fix Version/s: 4.0.5
    • Labels:
      None

      Description

      I have installed CiviCRM 4.0.2, Drupal 7.2 and have setup a views to display a list of upcoming events.

      The event has a start and end DATE/TIME.

      When displaying the view of upcoming events I noticed that the start and end dates were not the same as those specified when creating the event. After some searching the forums I have found that it is a timezone issue and have found an issue with civicrm_handler_field_datetime.inc in the way it does some date manipulation.

      In the civicrm_handler_field_datetime.inc file the Drupal timezone is retrieved.

      // get default time zone form Drupal
      $timezone = variable_get('date_default_timezone', 0);

      This value is subtracted later on from the UTC equivalent timestamp.
      $value = $value - $timezone;

      Now date_default_timezone can be a string such as Australia/Sydney which is not an integer.

      So the returned timestamp is the event DATETIME converted to UTC. From what I can tell, views expects the timestamp to correspond to the drupal system timezone.

      I'm still working out how to fix this and will post my findings soon.

        Attachments

          Activity

            People

            • Assignee:
              jalama Jim Taylor
              Reporter:
              cannod Dave
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: