NOW_UTC on beta

Wappler Version : beta 13
Operating System : mac
Server Model: node
Database Type: maria
Hosting Type:

Expected behavior

NOW_UTC should work on insert.

Actual behavior

I have the following test setup on Wapper 3.9

It inserts a record just fine and is something I’ve done numerous times.

Now in beta 13 I do the same test, to the same database:

I get the dreaded ER_TRUNCATED_WRONG_VALUE error:

{
  "status": "500",
  "code": "ER_TRUNCATED_WRONG_VALUE",
  "message": "insert into `junk` (`last_login_at`) values ('2021-07-17T21:04:43Z') - ER_TRUNCATED_WRONG_VALUE: Incorrect datetime value: '2021-07-17T21:04:43Z' for column `mpp`.`junk`.`last_login_at` at row 1",
  "stack": "Error: ER_TRUNCATED_WRONG_VALUE: Incorrect datetime value: '2021-07-17T21:04:43Z' for column `mpp`.`junk`.`last_login_at` at row 1\n    at Query.Sequence._packetToError (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n    at Query.ErrorPacket (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/protocol/sequences/Query.js:79:18)\n    at Protocol._parsePacket (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n    at Parser._parsePacket (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/protocol/Parser.js:433:10)\n    at Parser.write (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/protocol/Parser.js:43:10)\n    at Protocol.write (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n    at Socket.<anonymous> (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/Connection.js:88:28)\n    at Socket.<anonymous> (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/Connection.js:526:10)\n    at Socket.emit (node:events:378:20)\n    at addChunk (node:internal/streams/readable:313:12)\n    --------------------\n    at Protocol._enqueue (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n    at Connection.query (/Users/pauka/WapplerProjects/tbd/node_modules/mysql/lib/Connection.js:198:25)\n    at /Users/pauka/WapplerProjects/tbd/node_modules/knex/lib/dialects/mysql/index.js:134:18\n    at new Promise (<anonymous>)\n    at Client_MySQL._query (/Users/pauka/WapplerProjects/tbd/node_modules/knex/lib/dialects/mysql/index.js:128:12)\n    at Client_MySQL.query (/Users/pauka/WapplerProjects/tbd/node_modules/knex/lib/client.js:168:17)\n    at Runner.query (/Users/pauka/WapplerProjects/tbd/node_modules/knex/lib/runner.js:151:36)\n    at /Users/pauka/WapplerProjects/tbd/node_modules/knex/lib/runner.js:40:23\n    at /Users/pauka/WapplerProjects/tbd/node_modules/knex/lib/runner.js:277:24\n    at processTicksAndRejections (node:internal/process/task_queues:94:5)"
}

Both tests use the local wappler node server and Node v15.10 and point to the exact same db/table, so it seems all the variables have been removed.

Community Page
Last updated: