vcabbage / amqp

AMQP 1.0 client library for Go.
https://godoc.org/pack.ag/amqp
MIT License
134 stars 97 forks source link

Fix Incorrect time calculation for dates before the Unix epoch #174

Closed alanconway closed 5 years ago

alanconway commented 5 years ago

AMQP timestamp is a signed value, but decoded from buffer as unsigned. The previous code took the remainder of the unsigned value before converting to signed which is incorrect for negative timestamps.

Fixes #173

vcabbage commented 5 years ago

Thanks!