From f70e1c920719a5585a205f2a6f83ad36593931ba Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Wed, 13 Jan 2021 10:25:06 +0100 Subject: [PATCH] Fixed issue #16962: Sent is not recorded when validuntil is set and using MSSQL --- application/models/Token.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Token.php b/application/models/Token.php index b322f49218a..6eb00ee657d 100644 --- a/application/models/Token.php +++ b/application/models/Token.php @@ -361,8 +361,8 @@ public function rules() array('usesleft', 'numerical', 'integerOnly'=>true, 'allowEmpty'=>true, 'min'=>-2147483647, 'max'=>2147483647), array('mpid', 'numerical', 'integerOnly'=>true, 'allowEmpty'=>true), array('blacklisted', 'in', 'range'=>array('Y', 'N'), 'allowEmpty'=>true), - array('validfrom', 'date','format'=>['yyyy-M-d H:m:s','yyyy-M-d H:m'],'allowEmpty'=>true), - array('validuntil','date','format'=>['yyyy-M-d H:m:s','yyyy-M-d H:m'],'allowEmpty'=>true), + array('validfrom', 'date','format'=>['yyyy-M-d H:m:s.???','yyyy-M-d H:m:s','yyyy-M-d H:m'],'allowEmpty'=>true), + array('validuntil','date','format'=>['yyyy-M-d H:m:s.???','yyyy-M-d H:m:s','yyyy-M-d H:m'],'allowEmpty'=>true), array('emailstatus', 'default', 'value' => 'OK'), ); foreach (decodeTokenAttributes($this->survey->attributedescriptions) as $key => $info) {