mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-24 09:12:30 +02:00
Fixed #724.
Fixed type mismatch in msgpack_timestamp. Added 64bit singed postfix.
This commit is contained in:
@@ -41,7 +41,7 @@ struct as<std::chrono::system_clock::time_point> {
|
||||
uint64_t value;
|
||||
_msgpack_load64(uint64_t, o.via.ext.data(), &value);
|
||||
uint32_t nanosec = static_cast<uint32_t>(value >> 34);
|
||||
uint64_t sec = value & 0x00000003ffffffffL;
|
||||
uint64_t sec = value & 0x00000003ffffffffLL;
|
||||
tp += std::chrono::duration_cast<std::chrono::system_clock::duration>(
|
||||
std::chrono::nanoseconds(nanosec));
|
||||
tp += std::chrono::seconds(sec);
|
||||
@@ -79,7 +79,7 @@ struct convert<std::chrono::system_clock::time_point> {
|
||||
uint64_t value;
|
||||
_msgpack_load64(uint64_t, o.via.ext.data(), &value);
|
||||
uint32_t nanosec = static_cast<uint32_t>(value >> 34);
|
||||
uint64_t sec = value & 0x00000003ffffffffL;
|
||||
uint64_t sec = value & 0x00000003ffffffffLL;
|
||||
tp += std::chrono::duration_cast<std::chrono::system_clock::duration>(
|
||||
std::chrono::nanoseconds(nanosec));
|
||||
tp += std::chrono::seconds(sec);
|
||||
|
||||
Reference in New Issue
Block a user