top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between Unix timestamps and MySQL timestamps?

+1 vote
517 views
What is the difference between Unix timestamps and MySQL timestamps?
posted Mar 13, 2017 by Navya

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Internally Unix timestamps are stored as 32-bit integers, while MySQL timestamps are stored in a similar manner, but represented in readable YYYY-MM-DD HH:MM:SS format.

Both Unix timestamp and MySQL timestamp are stored as 32-bit integers. MySQL timestamp is represented in readable format of YYYY-MM-DD HH:MM:SS format. and UNIX_TIMESTAMP(), If called with no argument, returns a Unix timestamp (seconds since '1970-01-01 00:00:00' UTC) as an unsigned integer. If UNIX_TIMESTAMP() is called with a date argument, it returns the value of the argument as seconds since '1970-01-01 00:00:00' UTC. date may be a DATE string, a DATETIME string, a TIMESTAMP, or a number in the format YYMMDD or YYYYMMDD.

answer Mar 20, 2017 by Manikandan J
...