【发布时间】:2016-05-04 08:50:52
【问题描述】:
如何在yii的GridView中设置正确格式的时间戳为当地时间
framework, for example:
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
'add_time', // I see here a date/time from database not in my cyrrent timezone
],
]); ?>
猜猜,问题应该通过在数据库设置中设置适当的全局时区来解决,但是怎么做呢?
【问题讨论】: