Mysql timestamp overflow problem

Source: Internet
Author: User
As we all know, the timestamp is the number of seconds since January 1, January 1, 1970 (00: 00: 00GMT. It is also known as the Unix timestamp (UnixTimestamp ). Mysql also provides timestamp functions, such as unix_timestamp () and from_unixtime (). Currently, the general timestamp is a 32-bit unsigned integer, which indicates that the timestamp will

As we all know, the timestamp is the number of seconds since January 1, January 1, 1970 (00:00:00 GMT. It is also called Unix Timestamp ). Mysql also provides timestamp functions, such as unix_timestamp () and from_unixtime (). Currently, the general timestamp is a 32-bit unsigned integer, which indicates that the timestamp will

As we all know, the timestamp is the number of seconds since January 1, January 1, 1970 (00:00:00 GMT. It is also called Unix Timestamp ).

Mysql also provides timestamp functions, such as unix_timestamp () and from_unixtime ().
Now the General timestamp seems to be a 32-bit unsigned integer, which indicates that the timestamp will overflow over time. In fact, the timestamp range is until January 1, 2038.

What if your unix_timestamp () function lock gets in 2039? It is very easy to adjust your system time to 2039, and then restart your mysql service. The following prompt box is displayed:



For example, on the mysql command line, enter select UNIX_TIMESTAMP ('2017-01-01 ');

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.