MySQL doesn't save the date properly.I am trying to add createdAt column in database.
I've tried using MySQL NOW() function already, but it doesn't seem to work.
// Go pseudo-code with sql query
stmt, _:= d.db.Prepare("INSERT INTO posts(title, body, EmailHref, SlackHref, DiscordHref, InstHref, Time) VALUES(?, ?, ?, ?, ?, ?, NOW());")
res, err := stmt.Exec(newPost.Title, newPost.Body, newPost.EmailHref, newPost.SlackHref, newPost.DiscordHref, newPost.InstHref)
The type for createdAt column in MYSQL is DATE.
This is what I get when i fetch newly created post:
"time": "2019-04-24T00:00:00Z"
I expect to get actual time with up to minutes.