Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am gtwalford on github.
* I am gtwalford (https://keybase.io/gtwalford) on keybase.
* I have a public key whose fingerprint is 04B1 3D74 418E D94F C20C 9B21 53CB 917E 2524 61F1
To claim this, I am signing this object:
@gtwalford
gtwalford / dateTimeCheck
Last active August 29, 2015 14:06
Php Date Time Comparisons
// Set Expiration DateTime
$expiresDate = new DateTime( $data['expires'], new DateTimeZone( 'UTC' ) );
// Set Current DateTime
$now = new DateTime('now', new DateTimeZone( 'UTC' ));
// If needed determine difference
$dateDiff = $expiresDate->diff( $now );
// Print out for testing