Sample code for 30+ languages & platforms
PureBasic

Transition from ZipEntry.GetDt to ZipEntry.FileDateTimeStr

Provides instructions for replacing deprecated GetDt method calls with FileDateTimeStr.

Chilkat PureBasic Downloads

PureBasic
IncludeFile "CkDateTime.pb"
IncludeFile "CkZipEntry.pb"

Procedure ChilkatExample()

    entry.i = CkZipEntry::ckCreate()
    If entry.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    ; ...
    ; ...

    ; ------------------------------------------------------------------------
    ; The GetDt method is deprecated:

    dtObj.i = CkZipEntry::ckGetDt(entry)
    If CkZipEntry::ckLastMethodSuccess(entry) = 0
        Debug CkZipEntry::ckLastErrorText(entry)
        CkZipEntry::ckDispose(entry)
        ProcedureReturn
    EndIf

    ; ...
    ; ...

    CkDateTime::ckDispose(dtObj)

    ; ------------------------------------------------------------------------
    ; Do the equivalent using FileDateTimeStr.

    dt.i = CkDateTime::ckCreate()
    If dt.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkDateTime::ckSetFromRfc822(dt,CkZipEntry::ckFileDateTimeStr(entry))


    CkZipEntry::ckDispose(entry)
    CkDateTime::ckDispose(dt)


    ProcedureReturn
EndProcedure