src/Genesis/API/Response.php
public static function transformFilterTimestamp($transaction)
    {
        if (isset($transaction->timestamp)) {
            try {
                $transaction->timestamp = new \DateTime($transaction->timestamp);
            } catch (\Exception $e) {
                // Just log the attempt
                error_log($e->getMessage());
            }
        }

        return $transaction;
    }
public static function transformFilterTimestamp($transaction)
    {
        if (isset($transaction->timestamp)) {
            try {
                $transaction->timestamp = new \DateTime($transaction->timestamp);
            } catch (\Exception $e) {
                // Just log the attempt
                error_log($e->getMessage());
            }
        }

        return $transaction;
    }
public static function transformFilterTimestamp ( $ transaction ) { if ( isset ( $ transaction -> timestamp ) ) { try { $ transaction -> timestamp = new \ DateTime ( $ transaction -> timestamp ) ; } catch ( \ Exception $ e ) { // Just log the attempt error_log ( $ e -> getMessage ( ) ) ; } } return $ transaction ; }
Get DateTime object from the timestamp inside the response

@param \stdClass|\ArrayObject $transaction

@return \DateTime|null (if invalid timestamp)
Get DateTime object from the timestamp inside the response