Ok I had to take it out of a function and make it a straight query just to get an output. Here is the output of the $debug_tickets:
Code:
tid=2 tadded=1265002705 radded= seconds=-1265002705 i=1
tid=1 tadded=1264641238 radded=1264641238 seconds=-1265002705 i=2
LOL no idea what I'm even looking at honestly. I recognize the numbers and know a few things but nothing concrete.
--------------- Added [DATE]1265079985[/DATE] at [TIME]1265079985[/TIME] ---------------
BTW, the first line of tid=2, radded= is blank because no reply has been added to that ticket.
--------------- Added [DATE]1265080418[/DATE] at [TIME]1265080418[/TIME] ---------------
Reversed $seconds += ($rep - $tick) to ($tick - $rep) which gives me the following:
Code:
tid=2 tadded=1265002705 radded= seconds=1265002705 i=1
tid=1 tadded=1264641238 radded=1264641238 seconds=1265002705 i=2
And time read out of:
--------------- Added [DATE]1265081378[/DATE] at [TIME]1265081378[/TIME] ---------------
Added a reply to the tid=2 and this is the new output:
Code:
tid=2 tadded=1265002705 radded=1265084927 seconds=-82222 i=1
tid=1 tadded=1264641238 radded=1264641238 seconds=-82222 i=2
-12:34