Sample code for 30+ languages & platforms
C

Transition from ZipEntry.GetDt to ZipEntry.FileDateTimeStr

Provides instructions for replacing deprecated GetDt method calls with FileDateTimeStr.

Chilkat C Downloads

C
#include <C_CkZipEntry.h>
#include <C_CkDateTime.h>

void ChilkatSample(void)
    {
    HCkZipEntry entry;
    HCkDateTime dtObj;
    HCkDateTime dt;

    entry = CkZipEntry_Create();

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  The GetDt method is deprecated:

    dtObj = CkZipEntry_GetDt(entry);
    if (CkZipEntry_getLastMethodSuccess(entry) == FALSE) {
        printf("%s\n",CkZipEntry_lastErrorText(entry));
        CkZipEntry_Dispose(entry);
        return;
    }

    //  ...
    //  ...

    CkDateTime_Dispose(dtObj);

    //  ------------------------------------------------------------------------
    //  Do the equivalent using FileDateTimeStr.

    dt = CkDateTime_Create();
    CkDateTime_SetFromRfc822(dt,CkZipEntry_fileDateTimeStr(entry));


    CkZipEntry_Dispose(entry);
    CkDateTime_Dispose(dt);

    }