node-mssql icon indicating copy to clipboard operation
node-mssql copied to clipboard

Tedious useUTC on Insert & Select

Open shiroze opened this issue 1 year ago • 3 comments

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

  • NodeJS: 18.10.0
  • node-mssql: 9.1.1
  • SQL Server: 2016

shiroze avatar Mar 16 '23 07:03 shiroze

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

dhensby avatar Mar 16 '23 10:03 dhensby

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

shiroze avatar Mar 17 '23 02:03 shiroze

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

dhensby avatar Mar 17 '23 20:03 dhensby