tediousjs / node-mssql

Microsoft SQL Server client for Node.js
https://tediousjs.github.io/node-mssql
MIT License
2.23k stars 467 forks source link

Tedious useUTC on Insert & Select #1478

Open shiroze opened 1 year ago

shiroze commented 1 year ago

Why there's bug between Insert & Select when using useUTC:false ?

Condition not using useUTC:false

SQL Server Select image Postman Select image

Condition when useUTC:false

Postman Select image

If I don't set useUTC to false when insert the datetime become UTC+00:00 (04:58:30)

Expected Behavior set useUTC:false

when Insert get the value 11:58:30

Software versions

dhensby commented 1 year ago

Could this be related to this comment: https://github.com/tediousjs/node-mssql/issues/439#issuecomment-1281927162 ?

shiroze commented 1 year ago

Could this be related to this comment: #439 (comment) ?

Yes, But I'm not using New Date() or Now condition. I'm passing string datetime "2023-03-16 11:58:30"

I think the problem come from tedious. I try using same method and return same result

dhensby commented 1 year ago

Ok, then you will need to raise this with tedious if you think it's an error from the driver