Skip to content

parameter.value.getTimezoneOffset is not a function #916

@jtara1

Description

@jtara1

Hey, I'm working on debugging this error, but I'm using a private lib for Transact SQL / MS SQL Server that depends on tedious.

partial stacktrace

            "Caused By: TypeError: parameter.value.getTimezoneOffset is not a function",
            "    at Object.writeParameterData (D:\\home\\site\\wwwroot\\node_modules\\tedious\\lib\\data-type.js:1506:39)",
            "    at new RpcRequestPayload (D:\\home\\site\\wwwroot\\node_modules\\tedious\\lib\\rpcrequest-payload.js:89:12)",
            "    at Connection.execSql (D:\\home\\site\\wwwroot\\node_modules\\tedious\\lib\\connection.js:724:58)",

Snip20190625_9

I attached a debugger and inspected values above there. The data type for param.value does not seem what is expected for that var in that func.

We can const moment = require('moment'); moment.utc(1560556800000); to see that it represents the same date that I initially used as input in our private lib for a transaction in a ms sql server db for the date '2019-06-15'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions