tencentyun / wafer2-node-sdk

Wafer2 SDK for Node.js
Other
268 stars 57 forks source link

lib mysql knex 连接初始化漏掉了timezone 信息 #13

Closed kerzhang closed 6 years ago

kerzhang commented 6 years ago

/lib/mysql/index 中 knex connection 初始化信息如下 module.exports = require('knex')({ client: 'mysql', connection: { host: configs.mysql.host, port: configs.mysql.port, user: configs.mysql.user, password: configs.mysql.pass, database: configs.mysql.db, charset: configs.mysql.char } })

其中缺少 timezone 配置,应该添加配置 timezone: 'UTC'。否则使用使用这个配置返回的timestamp 内容会被自动回退8个小时,导致时间错误。请验证。

jas0ncn commented 6 years ago

感谢提醒!欢迎提交 PR 一起维护!