Incorrect offset with datetimeoffset
type in SQL Server
#1205
Labels
built-in dialect
Related to a built-in dialect
mssql
Related to MS SQL Server (MSSQL)
question
Further information is requested
When inserting/updating a Javascript Date value to a column of type
datetimeoffset
in SQL Server, the offset is always+00:00
, which leads to wrong result ifuseUTC=false
andprocess.env.TZ !== 'UTC'
.Changing the TediousDataType for Date values from
#tedious.TYPES.DateTime
to#tedious.TYPES.DateTimeOffset
inMssqlDriver.#getTediousDataType
seems to fix this:I don't know enough about Tedious to know what the correct way to fix this is. My guess is that the correct TediousType should be read from the database metadata.
The text was updated successfully, but these errors were encountered: