【发布时间】:2016-06-16 17:53:11
【问题描述】:
在我的节点应用程序中,我使用 postgresql 作为我的数据库。我有一个字段名称startdate。它在我的本地系统中运行良好。当我在数字海洋中托管我的应用程序时,日期减少了 1 天并存储到数据库中......
我的模特:
"properties": {
"startDate": {
"type": "date",
"required": true,
"postgresql": {
"columnName": "startdate",
"dataType": "date",
"dataLength": null,
"dataPrecision": null,
"dataScale": null,
"nullable": "YES"
}
}
假设我将日期更新为"startDate":"2016-02-11".But its storing as2016-02-10`。这对我来说很奇怪。请分享您对此的想法。提前谢谢..
编辑: 我的 DigitalOcean 当前日期如下:
Thu Jun 16 05:36:48 EDT 2016
我的本地日期如下:
Thu Jun 16 15:07:17 IST 2016
EDT 和 IST 会有所不同吗?
【问题讨论】:
标签: node.js postgresql