C
C
Replace Deprecated GetExpirationDt
Shows how to replace the deprecated GetExpirationDt method.Chilkat C Downloads
#include <C_CkCache.h>
#include <C_CkDateTime.h>
void ChilkatSample(void)
{
HCkCache cache;
const char *cache_item_key;
HCkDateTime dt1;
HCkDateTime dt2;
cache = CkCache_Create();
// ....
// ....
cache_item_key = "xyz";
// Instead of this:
dt1 = CkCache_GetExpirationDt(cache,cache_item_key);
CkDateTime_Dispose(dt1);
// Do this:
dt2 = CkDateTime_Create();
CkDateTime_SetFromRfc822(dt2,CkCache_getExpirationStr(cache,cache_item_key));
CkCache_Dispose(cache);
CkDateTime_Dispose(dt2);
}