Maybe a duplicate, but cannot find a clear response.
I have a MySQL DB with both 'datetime' and 'timestamp' columns. I can compare them with query, and everything I do with one type can be done with the other the exact same way.
I do know that internally, they are stored differently, but in my application (laravel & phpmyadmin) they are both shown as "2021-08-05 12:00:00", even the timestamp.
When I update a model with timestamp column, I end up doing
$model->timestampColumn = strftime('%Y-%m-%d %H:%M:%S', time());
instead of a more logic
$model->timestampColumn = time();
If I update a model with a timestamp column with the second method (with laravel or raw query or phpmyadmin), I end up with the same error "incorrect datetime value", as "timestamp" was considered alias of "datetime".
Concretely, it's not a bug or a behavior that I want to change, but I want to understand why a timestamp column is not treated as a number (with eventually a datetime formatted display).
This question is NOT a question about witch one of timestamp or datetime should I use in my application. I know the advantage and inconvenient of both. The question is more at engine level, like "why this is designed like this and why the behavior is confusing" more than "which is better for my purpose".