views:

186

answers:

3

How does MySQL store timestamps internally? Is it an int, or a string or something else?

+1  A: 

I believe it uses a UNIX timestamp, which is an integer representing the number of seconds since the UNIX epoch: Jan 01 1970

Matthew Scharley
+9  A: 

From the MySQL Documentation:

TIMESTAMP: A four-byte integer representing seconds UTC since the epoch ('1970-01-01 00:00:00' UTC)

Asaph