bitpay / php-bitpay-client

PHP implementation for the BitPay cryptographically secure RESTful API
MIT License
166 stars 147 forks source link

Wrong invoice dates parsing #257

Closed SilverFire closed 6 years ago

SilverFire commented 6 years ago

Currently https://bitpay.com/invoices/%invoiceId% returns time with milliseconds as follows:

    'invoiceTime' => '1512559263104',
    'expirationTime' => '1512560163104',
    'currentTime' => '1512562237964',

Time assignation in Invoice.php on :477, :502, :527 is performed with assumption that timestamp is in seconds, that leads to obviously wrong DateTime object with date in far far future: 49901-02-15T09:51:44+01:00

See: https://3v4l.org/DUlIi

pieterpoorthuis commented 6 years ago

Fixed in v2.2.16