跳至正文
F·l CODE

F·l CODE

Cease to struggle and you cease to live.

  • PHP
  • Yii2
  • Nginx
  • Python
  • Mysql
  • NoSQL
  • Linux
  • Tools
  • Link
  • Books
  • About
  • 小程序
  • GitHub

标签: 时间格式

Yii2关于时间格式的设置

修改配置文件:

'language' => 'zh-CN',
'timeZone' => 'Asia/Shanghai',
'components' => [
    'formatter' => [
        'dateFormat' => 'yyyy-MM-dd',
        'datetimeFormat' => 'yyyy-MM-dd HH:mm:ss',
        'decimalSeparator' => ',',
        'thousandSeparator' => ' ',
        'currencyCode' => 'CNY',
    ],
],

继续阅读Yii2关于时间格式的设置

发布于 2017年1月10日2017年3月24日分类 Yii2标签 yii2、时间格式

鲁ICP备15041704号-1 Copyright © F·L CODE 2016-2020