In function advpoll_get_data, I found these code:
if ($node->advpoll_dates) {
$data['start_date'] = (isset($node->advpoll_dates[$lang])) ? strtotime($node->advpoll_dates[$lang][0]['value'] . ' UTC') : strtotime($node->advpoll_dates[LANGUAGE_NONE][0]['value'] . ' UTC');
$data['end_date'] = (isset($node->advpoll_dates[$lang])) ? strtotime($node->advpoll_dates[$lang][0]['value2'] . ' UTC') : strtotime($node->advpoll_dates[LANGUAGE_NONE][0]['value2'] . 'UTC');
}
If you use UTC to format start_date and end_date, the time will conflict with the site default timezoom. My site default timezoom is Asia/Shanghai, If in the code using UTC, it will differ 8 hours.
Comments
Comment #2
tripper54 commentedComment #3
tripper54 commentedThanks for submitting this patch. This issue is duplicated at #2709169: Poll availability date does not calculate correctly with non-UTC time zones . I'm closing this issue in favour of the newer one as the patch there extracts some duplicated logic.
Comment #4
tripper54 commented