[ https://issues.apache.org/jira/browse/PROTON-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715895#comment-16715895 ]
Alan Conway edited comment on PROTON-1981 at 12/11/18 1:13 AM: --------------------------------------------------------------- Timekeeping is really not our business - I can see why Andrew added it to the C proactor for our own use, since portable time is such a pain in C, but in other bindings we should be using the language-standard time APIs. C+++03 is no better than C (sigh) but C++11 is, and Go has excellent time support. In any case we should definitely make sure any C+++ time APIs we have lumbered ourselves with behave as documented. The Go binding uses the standard Go Time type, and does all the required conversions to/from AMQP-epoch-ms-time when encoding/decoding. The Go Time type cleverly includes both a wall-clock *and* a monotonic timestamp and automatically Does the Right Thing when you compute durations or format printable time-stamps, so you can pretty much forget about that distinction in Go. was (Author: aconway): Timekeeping is really not our business - I can see why Andrew added it to the C proactor for our own use, since portable time is such a pain in C, but in other bindings we should be using the language-standard time APIs. C++03 is no better than C (sigh) but C++11 is, and Go has excellent time support. In any case we should definitely make sure any C++ time APIs we have lumbered ourselves with behave as documented. The Go binding uses the standard Go Time type, and does all the required conversions to/from AMQP-epoch-ms-time when encoding/decoding. The Go Time type cleverly includes both a wall-clock *and* a monotonic timestamp and automatically Does the Right Thing when you compute durations or format printable time-stamps, so you can pretty much forget about that distinction in Go. > Wrong posix time for pn_proactor_now() > -------------------------------------- > > Key: PROTON-1981 > URL: https://issues.apache.org/jira/browse/PROTON-1981 > Project: Qpid Proton > Issue Type: Bug > Components: cpp-binding, proton-c > Affects Versions: proton-c-0.26.0 > Reporter: Cliff Jansen > Assignee: Cliff Jansen > Priority: Major > > Uses MONOTONIC instead of REALTIME, hence not anchored to UNIX epoch as per > AMQP standard. > > Used by proton::timestamp::now() > > Can take you back to 1970 on Centos7. Other time travel destinations > possible. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org