0

This is my table:

CREATE TABLE tblWidget (
    id int,
    title varchar(255),
    name varchar(255),
    dateAdded datetime NOT NULL DEFAULT NOW());

and this is my insert query:

INSERT INTO tblWidget (id, title, name)
    VALUES (602, 'title', 'name');

and the values after executing the select statement are:

id   title   name   dateAdded
607  title   name   2016-03-10 23:04:20

Everything is ok except time. At the time of insertion the time of my computer was 3:15 and inserted time was different.

jarlh
  • 42,561
  • 8
  • 45
  • 63

1 Answers1

2

NOW() gets datetime from machine where MySQL server runs.

Zamrony P. Juhara
  • 5,222
  • 2
  • 24
  • 40