RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File sharing script

File mirror script
timeleft problem.

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload
View previous topic :: View next topic  
Author Message
sanchoo



Joined: 08 Oct 2007
Posts: 2

PostPosted: Dec 11, 2007 8:52 pm    Post subject: timeleft problem. Reply with quote

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

Could u help me?
Thanks for all
Back to top
View user's profile
PilgrimX182



Joined: 22 Mar 2006
Posts: 2133
Location: UFO Lab

PostPosted: Dec 12, 2007 6:15 am    Post subject: Reply with quote

Probably you have script time & filesystem time not synced.
Try this quick hack: in upload_status.cgi find
Code:
my $ftime = (lstat($flength_file))[9]; # Upload start time

and replace it with
Code:
my $ftime = time;


saw this kind of bug on some servers before.
Back to top
View user's profile
Ciao121



Joined: 12 Jun 2009
Posts: 4

PostPosted: Jan 12, 2011 3:03 am    Post subject: Reply with quote

I have the same problem; tried this but no success. Sad
Back to top
View user's profile
Ciao121



Joined: 12 Jun 2009
Posts: 4

PostPosted: Jan 12, 2011 3:29 am    Post subject: Reply with quote

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

I changed in upload_status.html

Code:

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:

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? Smile

Thank you
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright © 2003-2013 Sibsoft Ltd