Skip to content

Commit a08b855

Browse files
committed
Fix date coercion
Fo associations queried with json path
1 parent fea5216 commit a08b855

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/adapters/mssql.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ module.exports = function () {
308308
switch (type) {
309309
case 'datetime':
310310
return function (value) {
311-
return new Date(value)
311+
if (typeof value === 'string') {
312+
return new Date(value.slice(0, 23) + 'Z')
313+
}
314+
return value
312315
}
313316
case 'integer':
314317
return Number

0 commit comments

Comments
 (0)