XUpload - timeleft problem.

Message
Author
sanchoo
Posts: 2
Joined: Oct 08, 2007 6:09 am

timeleft problem.

#1 Postby sanchoo » Dec 11, 2007 8:52 pm

I have a problem with yours script.
Timeleft isn't display as it should.
It shows me more minuts as is in hour.
As you can see on the screen
Image
Could u help me?
Thanks for all

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Dec 12, 2007 6:15 am

Probably you have script time & filesystem time not synced.
Try this quick hack: in upload_status.cgi find

Code: Select all

my $ftime = (lstat($flength_file))[9]; # Upload start time
and replace it with

Code: Select all

my $ftime = time;
saw this kind of bug on some servers before.

Ciao121
Posts: 4
Joined: Jun 12, 2009 9:05 am

#3 Postby Ciao121 » Jan 12, 2011 3:03 am

I have the same problem; tried this but no success. :(

Ciao121
Posts: 4
Joined: Jun 12, 2009 9:05 am

#4 Postby Ciao121 » Jan 12, 2011 3:29 am

I Think I solved. I'm using the free version.

I changed in upload_status.html

Code: Select all

function convertSeconds(seconds)
{
	hours = parseInt(seconds/36000);
	mins  = parseInt(seconds/60);
	secs  = seconds - hours*3600 - mins*60;
	if(hours<10){ hours = '0'+hours; }
	if(mins<10){ mins  = '0'+mins; }
	if(secs<10){ secs  = '0'+secs; }
	return hours+':'+mins+':'+secs;
}
to

Code: Select all

function convertSeconds(seconds)
{
	hours = parseInt(seconds/3600);
	mins  = parseInt(seconds/60 - hours*3600 / 60);
	secs  = seconds - hours*3600 - mins*60;
	if(hours<10){ hours = '0'+hours; }
	if(mins<10){ mins  = '0'+mins; }
	if(secs<10){ secs  = '0'+secs; }
	return hours+':'+mins+':'+secs;
}
I'm not a good programmer; can somebody check if this can cause any problem? :)

Thank you