Insert/Update Query updating datetime with same value

Wappler Version : 3.5.6
Operating System : Mac Big Sur
Server Model: nodejs
Database Type: mysql
Hosting Type: Docker Local

Expected behavior

The datetime field should insert as current date/time and update should reflect the date/time updated.

To show what I mean, here is a screenshot of the database.

Here is a screenshot of an insert query on the table.

Here is a screenshot of the update query on the table.

And here is a screenshot of the Edit Table Data.

Actual behavior

The datetime field is not updated as it should.

How to reproduce

There are several ways to reproduce this.

  1. You could create an insert query using {{Now_UTC}} as the value.
  2. You could create an update query using {{Now_UTC}} as the value.
  3. You could also simply update the value in the Edit Table Data.

FYI, all four entries shown in the screenshot and video were created today, November 27th.

Also, not sure if it matters or not, but the two fk_ fields (fk_users and fk_enable) are reference fields (INT) and I would think they would show as numbers, not sure that they should be showing up as text in the insert and update queries.

Are you sure the data in the database table is not inserted properly and the issue is not just in the database manager UI - have you checked this in a third party database tool?
Also NOW_UTC will return the time in the UTC time zone - not your local time :slight_smile:

1 Like

Hey @Teodor,

You are correct. I checked it in mysql workbench and it reflects the correct dates/times as being today at various periods.

Not sure why the database manager UI is not reflecting the correct values.

I try not to do things in third party tools because I like Wappler too much, :slight_smile: