Timestamp of field type in MySQL Tai Hang 2

Source: Internet
Author: User

The content of this article is still to discuss the MySQL field type is timestamp timestamp problem, after encountering the problem before, today the tester gave me a bug, is to submit a meeting form on the front page, select a meeting time (2059 time), reported a mistake, Server directly blew up, throw custom error message, then I between forced a lap, feel the code is not written wrong, the database field type is also correct, and then look at the exception information thrown, is the MySQL database thrown exception, prompt time format has a problem, but looked, there is no problem.

I try to choose a more normal time, the form can be submitted normally, there is no problem, and then in the database to the wrong time to save directly in the database, MySQL prompt error, guess is not the size of the time limit.

Baidu has a, found timestamp type of field, time size is really limited, and the limit is: 1970-2038, so the front page in the selection of time, the time to choose outside the range of time, MySQL database directly does not support the storage of this time, So it's an error.

The pit has come to the pit, or the pit has been mined.

Timestamp of field type in MySQL Tai Hang 2

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.