Justin Kelly

various ramblings

Get the Number of Seconds Since Jan 1, 0001 in PHP : How To

If you need to get the number of seconds since Jan 1, 0001 in PHP you can't use the normal date or time functions as they are based around Jan 1, 1970

Here is a simple function to get the number of seconds since Jan 1, 0001 (or any other date)

This date calc is required if you are using the ACH PaymentsGateway.com API

Requires PHP 5.3 and above