ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on October 06, 2013, 05:07:50 am

Title: [borderline] discrepancy between relative times
Post by: emanuele on October 06, 2013, 05:07:50 am
There is a small discrepancy between relative times calculated by php and js.
Why?
I used round in js and I think the php uses floor (even though I thought I changed it to match, but maybe I changed and then reverted the change in order to ask for opinions and then I forgot to ask lol).

So: what do you prefer? floor or round?
Title: Re: [borderline] discrepancy between relative times
Post by: TE on October 06, 2013, 06:06:03 am
I think round is a bit more precise but I really don't care that much..
Title: Re: [borderline] discrepancy between relative times
Post by: Spuds on October 06, 2013, 08:55:50 am
I'd think floor is generally used in the php code, not sure why .. maybe since it will tend to drive values away from one another to show a delta sooner?  Or maybe I'm just making stuff up :P ... I'd pick the one that you have to change the fewest of ;)
Title: Re: [borderline] discrepancy between relative times
Post by: emanuele on November 29, 2013, 04:49:55 pm
Thinking about the errors when the user offset is wrong, there is to consider that is most likely wrong for guests too, so I think we should send out a "representation" of the server time and use that to calculate the relative times via javascript.
Title: Re: [borderline] discrepancy between relative times
Post by: emanuele on December 19, 2013, 05:15:43 am
That one should be now solved.