Skip to content

Commit 9c9a014

Browse files
committed
Fix date coercion in postgres
1 parent 405a537 commit 9c9a014

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/adapters/postgres.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,11 @@ module.exports = function () {
175175
return fetchCommand
176176
}
177177

178-
adapter.getCoercionFunction = function (type, timezone) {
178+
adapter.getCoercionFunction = function (type) {
179179
switch (type) {
180180
case 'datetime':
181181
return function (value) {
182-
if (timezone === 'ignore') {
183-
var d = new Date(value + 'Z')
184-
return new Date(
185-
d.getTime() + d.getTimezoneOffset() * 60000
186-
)
187-
} else {
188-
return new Date(value)
189-
}
182+
return new Date(value)
190183
}
191184
default:
192185
return function (value) {

0 commit comments

Comments
 (0)