CkDateTime::DiffSeconds returns 0 when it should have returned a negative value (according to the documentation):
CkDateTime ckdt1, ckdt2; ckdt1.SetFromTimestamp("2016-01-01T12:00:00Z"); ckdt2.SetFromTimestamp("2017-01-01T12:00:00Z"); auto nSeconds1 = ckdt1.DiffSeconds(ckdt2); // nSeconds1 = 0 auto nSeconds2 = ckdt2.DiffSeconds(ckdt1); // nSeconds2 = 31622400
ckdt1 is obviously older than ckdt2, but does not return -31622400 as expected. No error is returned and put_VerboseLogging/put_DebugLogFilePath/lastErrorText does not indicate any issues.
This has been tested with version 22.214.171.124 of Chilkat C/C++ Libs for VC++ 12.0 XP / win32.
By the way I am missing a simple method to compare dates. Maybe DiffSeconds was meant for that purpose, but counting the exact difference ought to be slower than to simply determine which is newer/older/equal.
I made the fix, but can't produce a new build until late today or tomorrow. I'll post it here.
PS> DiffSeconds is valid for comparing dates. It's not slower than if a method returned true/false.
Thanks, I'll have a look..
This new build should fix it: