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. |