How to get a signed unix timestamp from a MySQL datetime field that is pre Unix Epoch compatible
If you’ve ever used MySQL to store dates with datetime and wanted to use UNIX_TIMESTAMP() on dates from before the Unix Epoch, here is a little bit of SQL magic for you.