Relates to the implemented fix in https://www.drupal.org/node/1896264: this fix added the default timezone of UTC when calculating the date fields. This means that the date calculation is still incorrect when timezones other than UTC have been used to collect the dates.

This was seen on a site using the default London/Europe timezone and advpolls: polls were reporting as closed for an hour longer than they should during BST as the open/closed dates were being processed as UTC, not the timezone stored in the field.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MrDaleSmith created an issue. See original summary.

MrDaleSmith’s picture

Created a patch that adds a custom helper to pull date data from the advpoll node taking account of any timezone stored in the field data.

Code uses a entity_metadata_wrapper to obtain language agnostic values from the node, which means a dependency on entity has to be added to the module. If this is acceptable, it may be worth updating all the code to use entity_metadata_wrappers instead of the current language workarounds.

MrDaleSmith’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: 2709169-poll_availability_date_utc-2.patch, failed testing.

MrDaleSmith’s picture

I don't think that fail is anything to do with the patch, although I'd be happy to rework if it turns out it is?

tripper54’s picture

Yar, weird, the tests run OK for me locally.

It might have been an issue with a dependant module as the tests failed to enable the required modules.

I re-rolled with the addition of your added entity api dependency in the test setup method.

We'll see how that goes.

tripper54’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: poll_availability_date-2709169-6.patch, failed testing.

The last submitted patch, 6: poll_availability_date-2709169-6.patch, failed testing.

The last submitted patch, 6: poll_availability_date-2709169-6.patch, failed testing.

The last submitted patch, 6: poll_availability_date-2709169-6.patch, failed testing.

wylbur’s picture

Using
Drupal 7.43
PHP 5.5.9
MySQL 5.5.49
Advanced Poll
Version : 7.x-3.0-alpha1+6-dev
Date : 2016-04-20

Applied patch successfully from the root of the Advanced Poll module directory.

When we schedule an opening date, the date/time was offest by the difference of our time zone to UTC. After patching module, the open date now matches displayed open date.

Did NOT mark this as RTBC, but I consider this review and tested.

tripper54’s picture

Status: Needs work » Needs review

trying these tests again.

Status: Needs review » Needs work

The last submitted patch, 14: poll_availability_date-2709169-14.patch, failed testing.

The last submitted patch, 14: poll_availability_date-2709169-14.patch, failed testing.

The last submitted patch, 14: poll_availability_date-2709169-14.patch, failed testing.

The last submitted patch, 14: poll_availability_date-2709169-14.patch, failed testing.

tripper54’s picture

Status: Needs review » Needs work

The last submitted patch, 19: poll_availability_date-2709169-19.patch, failed testing.

The last submitted patch, 19: poll_availability_date-2709169-19.patch, failed testing.

The last submitted patch, 19: poll_availability_date-2709169-19.patch, failed testing.

The last submitted patch, 19: poll_availability_date-2709169-19.patch, failed testing.