Re: [PHP] a little math

2007-04-20 Thread Richard Lynch
On Fri, April 20, 2007 4:37 am, Sebe wrote: > $seconds = (($job['run_time'] - 60) * $minutes); This is still just plain wrong... Use what the people are telling you to use, because it's right. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from som

Re: [PHP] a little math

2007-04-20 Thread Richard Lynch
On Fri, April 20, 2007 3:55 am, Sebe wrote: > maybe someone can figure why sometimes i get negative values for > seconds.. > > $job['finished'] and $job['finished'] are both unix timestamp. > i subtract both to get how many seconds some thing took.. well you > should be able to read the rest. somet

Re: [PHP] a little math

2007-04-20 Thread Sebe
Edward Kay wrote: maybe someone can figure why sometimes i get negative values for seconds.. $job['finished'] and $job['finished'] are both unix timestamp. i subtract both to get how many seconds some thing took.. well you should be able to read the rest. sometimes it works fine but other times

RE: [PHP] a little math

2007-04-20 Thread Edward Kay
> > maybe someone can figure why sometimes i get negative values for seconds.. > > $job['finished'] and $job['finished'] are both unix timestamp. > i subtract both to get how many seconds some thing took.. well you > should be able to read the rest. sometimes it works fine but other times > i get n

[Fwd: Re: [PHP] a little math]

2007-04-20 Thread Fredrik Thunberg
Don't know your problem but: if $totalTime is total length in seconds $minutes = floor($totalTime / 60); $seconds = $totalTime % 60; /Fredrik Sebe skrev: maybe someone can figure why sometimes i get negative values for seconds.. $job['finished'] and $job['finished'] are both unix timestamp.

[PHP] a little math

2007-04-20 Thread Sebe
maybe someone can figure why sometimes i get negative values for seconds.. $job['finished'] and $job['finished'] are both unix timestamp. i subtract both to get how many seconds some thing took.. well you should be able to read the rest. sometimes it works fine but other times i get negative se