Skip to main content
Topic: [borderline] discrepancy between relative times (Read 5880 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[borderline] discrepancy between relative times

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?
Bugs creator.
Features destroyer.
Template killer.

Re: [borderline] discrepancy between relative times

Reply #1

I think round is a bit more precise but I really don't care that much..
Thorsten "TE" Eurich
------------------------

Re: [borderline] discrepancy between relative times

Reply #2

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 ;)

Re: [borderline] discrepancy between relative times

Reply #3

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.
Bugs creator.
Features destroyer.
Template killer.

 

Re: [borderline] discrepancy between relative times

Reply #4

That one should be now solved.
Bugs creator.
Features destroyer.
Template killer.