Sample code for 30+ languages & platforms
C++ Requires Chilkat v11.0.0+

Transition from Cert.GetValidToDt to Cert.ValidToStr

Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.

Chilkat C++ Downloads

C++
#include <CkCert.h>
#include <CkDateTime.h>

void ChilkatSample(void)
    {
    CkCert cert;

    //  ------------------------------------------------------------------------
    //  The GetValidToDt method is deprecated:

    CkDateTime *ckdt1 = cert.GetValidToDt();
    if (cert.get_LastMethodSuccess() == false) {
        std::cout << cert.lastErrorText() << "\r\n";
        return;
    }

    //  ...
    //  ...

    delete ckdt1;

    //  ------------------------------------------------------------------------
    //  Do the equivalent using the ValidToStr property

    CkDateTime ckdt2;
    ckdt2.SetFromRfc822(cert.validToStr());
    }