Page 1 of 1

ICEFDownloadItem.EndTime

Posted: Sat Jun 26, 2021 11:52 am
by 7bit
Hello! Tell me how to use this property? I want to show the end time of the download when uploading a file, but this property contains some strange value. For example, it could be 01.01.1601 (as the number -109205).

Re: ICEFDownloadItem.EndTime

Posted: Sat Jun 26, 2021 6:53 pm
by salvadordf
Hi,

All the properties and methods in that interface correspond to this CEF class :
https://magpcss.org/ceforum/apidocs3/projects/(default)/CefDownloadItem.html

EndTime has a different meaning :
Returns the time that the download ended.

Re: ICEFDownloadItem.EndTime

Posted: Sun Jun 27, 2021 8:36 am
by 7bit
Thanks for the link, but there is very little information there. Some value is returned, but I cannot understand how to interpret it.
I expected the return value to be date and time. For example, the current time is 06/27/2021 11:34, and EndTime returns 06/27/2021 11:56. And calculating the difference between the end time and the current one, I could show how much time is left until the end of the download.

Re: ICEFDownloadItem.EndTime

Posted: Sun Jun 27, 2021 9:27 am
by salvadordf
ICEFDownloadItem.EndTime is a standard TDateTime value but EndTime is used for downloads only, not for uploads.

If you need to show an estimated time of arrival you can calculate it with the start time and the amount of data transmitted at any given time.

Re: ICEFDownloadItem.EndTime

Posted: Sun Jun 27, 2021 9:55 am
by 7bit
Sorry for my english. I need to know the download end time. I understand that this is a DateTime value. But I don't understand how to use it. Is that why this property only returns the date? In theory, there should be both date and time.

Re: ICEFDownloadItem.EndTime

Posted: Sun Jun 27, 2021 10:29 am
by salvadordf
TDateTime has a date and a time but, according to the CEF documentation EndTime will give a meaningful result after the download has already ended.

You can calculate an estimated time of arrival for downloads too with the same method I commented before.

Re: ICEFDownloadItem.EndTime

Posted: Sun Jun 27, 2021 11:30 am
by 7bit
Ahh. I finally figured it out. This property is not what I thought. Thank you!