Archived Forum PostQuestion:
I am trying to use get_CreateTime but it wants sysTime.
I have been to http://www.chilkatsoft.com/refdoc/phpCkSFtpFileRef.html but I do not understand this line // sysTime is a SYSTEMTIME object (output)
What does the sysTime represent and how do I use it to get the Create Time of a file
The SYSTEMTIME structure is something from the MS Windows history of Chilkat. About 10 years ago, Chilkat began as a component vendor for C++ libs and ActiveX components specific to the Windows platform. This is where the use of the SYSTEMTIME structure originated.
The SYSTEMTIME structure is defined (in C++ syntax) as follows:
struct SYSTEMTIME {
unsigned short wYear;
unsigned short wMonth;
unsigned short wDayOfWeek;
unsigned short wDay;
unsigned short wHour;
unsigned short wMinute;
unsigned short wSecond;
unsigned short wMilliseconds;
};
In PHP, you would access it like this:
<?php
include("chilkat_9_3_2.php");
$sftpFile = new CkSFtpFile();
$sysTime = new SYSTEMTIME();
$sftpFile->get_CreateTime($sysTime);
print $sysTime->wHour . ":" . $sysTime->wMinute . "\n";
?>
Some important notes:
$dateTime = new CkDateTime(); $dt = new CkDtObj(); $dt->DeSerialize($dateTime->serialize()); print $dt->get_Hour() . ":" . $dt->get_Minute() . "\n";
Finally, the methods ending in "Dt" return a CkDateTime object (as opposed to the methods where a SYSTEMTIME object is passed in to be populated). For example:
$dateTime = $sftpFile->GetCreateDt();
Thank you very much for your answer. I don't have any c++ experience, so your answer was helpful