We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

[SOLVED]Invalid datetime value when I set to '1900-01-01'

exception 'PDOException' with message 'SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1900-01-01' for column 'creation_date' at row 1'

model->creation_date = '1900-01-01';

the column type is timestamp, database is mysql, thanks.


@mia0606 unix timestamp seconds since Jan 01 1970. Try 2014-02-08 00:00:00