MySQL Forums
Forum List  »  Newbie

Automatic timezone assigned to inserted value
Posted by: Max Mattsson
Date: June 07, 2021 07:31AM

Hi, I want to simply have a column in my table which stores the time and date of when the row was inserted. I have goolged around and i cant make it work, Im new to mysql. Currently my table has a column called Timestamp which is of datatype TIMESTAMP and has Default/Expression CURRENT_TIMESTAMP. When i enter new value it doesnt show the time, only the date. And when i retrieve the data i get the wrong date but I also get the time. when i retrieve the timestamp i get 2021-06-06T22:00:00Z and this is what i get everytime no matter when that value is inserted. I figured it would be better to just remove this column and try with a new one. How should i create this column to get it working?

Thanks!

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.