PDA

View Full Version : Problem with poll and timeout datepicker


shka
09-08-2019, 04:40 PM
I'm running 5.5.3 in a test environment with german language pack.

Make a poll with timeout. If I reedit this poll with english forum language the datefield is correct shown, $conversation["timeoutstr"] has a valid value.

If I change to german and edit the poll the datefield shows nothing, JS reports an "invalid string".

core\vb\library\content\poll.php - line 110
$record['timeoutstr'] = vbdate("m/d/Y H:i", $record['timeout']);

core\includes\functions.php - line 1975 ff.
else
{
$returndate = $datefunc($format, $timestamp_adjusted);
}

In "en" case the date() is called with "m/d/Y H:i" - return value is a correct date string
In "de" case the strftime() is called with "m/d/Y H:i" - return value is "m/d/Y H:i", cause i is an invalid param for strftime and all params need a %.
So for me it only works with "%m/%d/%Y %H:%M"

Wrong vB configuration? Known bug? I use php 7.3.4

core\includes\functions.php - line 1975 ff. quick and dirty
else
{
if ($datefunc == "strftime" or $datefunc == "gmstrftime") {
$returndate = $datefunc("%m/%d/%Y %H:%M", $timestamp_adjusted);
} else {
$returndate = $datefunc($format, $timestamp_adjusted);
}
}