Bug #50754 Use int for timestamp field
Submitted: 30 Jan 2010 10:12 Modified: 1 Feb 2010 8:46
Reporter: Olaf van der Spek (Basic Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version:* OS:Any
Assigned to: CPU Architecture:Any
Tags: qc

[30 Jan 2010 10:12] Olaf van der Spek
Description:
Timestamps fields are formatted on I/O. This is kinda unusable in C or PHP. Could an option be added to transfer timestamp fields as ints?

How to repeat:
-
[30 Jan 2010 11:11] Valeriy Kravchuk
Sounds like a feature request. Why severity S3 then?
[30 Jan 2010 11:13] Olaf van der Spek
It's more like a bug in the design than a new feature. But yeah, feature request might be more appropriate technically.
[28 Oct 2020 19:40] Bob Terrell
Just going to throw it out there that this bug has been open for *10 years*, and there's *still* no way to directly insert a timestamp into a TIMESTAMP column.

You're stuck converting the timestamp into a datetime with FROM_UNIXTIME(), and if you don't want daylight saving time screwing up the conversion back and forth (which is at least half the point of using the column), you need to explicitly set the time zone. If you started with a timestamp, though, this either means several queries to get the existing time zone, set it to +00:00, and then set it back, or manipulate the timestamp in an external language.

Either way, let's reiterate the absurdity that you can't put a TIMESTAMP in a TIMESTAMP column.