Hi all, i find a strange problem, as you can see in image attachments
6088
yii2_gridview_date_problem.JPG
here is the GridView code:
echo GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'date_ini',
'format' => ['date', \Yii::$app->params['dateControlDisplay']['date']]
],
'date_ini',
[
'attribute' => 'date_end',
'format' => ['date', 'php:d/m/Y']
],
'date_end',
],
]);
As you can see, i have 2 record in my db table. For the first row displayed (id=2) the date was correctly converted to the format specified.
For the second row (id=1) the convertions add 1 day to the original date in the db.
Can someone help me? I don’t know really what it can be.
Thank’s