
yii框架中,可以直接在/protected/config/main.php中设置时区,即可(补充:Yii2方法也是一样,在common/config/main.php中添加)。 (推荐学习:yii教程)
在config文件夹下,main.php 中,
这是使用 Swiper 插件制作的「网易智造」首页宽幅大气幻灯片效果,幻灯片共 6 幅,响应式设计,切换方式位淡入淡出,鼠标移入幻灯片区域显示左右箭头,移出隐藏箭头,同时设置了自动播放、延迟加载图片。
return [
'charset' => 'utf-8',
'language' => 'zh-CN',
'timeZone' => 'Asia/Shanghai',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache'
],
'formatter' => [
'dateFormat' => 'yyyy-MM-dd',
'timeFormat' => 'HH:mm:ss',
'datetimeFormat' => 'yyyy-MM-dd HH:mm:ss'
]
]
];









