MYSQL ways to represent '1970-1-1 0:0:0'
FROM_UNIXTIME(0) is not really '1970-01-01 00:00:00'.

It can be skewed by timezone and daylight saving time.

For example, I live in the New York area, which is -5 from GMT. My system says how and why:

mysql&gt; SELECT UNIX_TIMESTAMP('1970-01-01 00:00:00');
+---------------------------------------+
| UNIX_TIMESTAMP('1970-01-01 00:00:00') |
+---------------------------------------+
|                                 18000 |
+---------------------------------------+
1 row in set (0.00 sec)

mysql&gt; select FROM_UNIXTIME(0);
+---------------------+
| FROM_UNIXTIME(0)    |
+---------------------+
| 1969-12-31 19:00:00 |
+---------------------+
1 row in set (0.00 sec)

mysql&gt;


It is actually off by 5 hours (18000 seconds)

To correct it, move forward one day and back HOUR(FROM_UNIXTIME(0)) hours

mysql&gt; SELECT FROM_UNIXTIME(0) + INTERVAL 1 DAY - INTERVAL HOUR(FROM_UNIXTIME(0)) HOUR DT;
+---------------------+
| DT                  |
+---------------------+
| 1970-01-01 00:00:00 |
+---------------------+
1 row in set (0.00 sec)

mysql&gt;


or simply go forward 5 hours 

mysql&gt; SELECT FROM_UNIXTIME(0) + INTERVAL (24 - HOUR(FROM_UNIXTIME(0))) HOUR DT;
+---------------------+
| DT                  |
+---------------------+
| 1970-01-01 00:00:00 |
+---------------------+
1 row in set (0.00 sec)

mysql&gt;


This formula should work in any timezone