Bug #15737
closedNegative Ages (From timestamps in the future) get shown wrong
0%
Description
There are two different methods used for calculating the age of a record. As the on in tslib_content always seems to get used for calculating a real age of a news record or something it seems it never has occured that somebody outputted the age of a timestamp which lies in the future.
There is a little difference between the method t3lib_BEfunc::calcAge and tslib_cObj->calcAge. The difference is that currently in the FE version no abs() is done and thus negative timestamps will always be lower than 3600 and the first if condition will always match.
Solution (would also be nice to use this on for the BE or have ONE SHARED method:
Make a variable which contains the absolute value of the seconds value.
Compare in which unit to display using the absolute value.
Generate the output using the original value (no need for a $prefix variable and string juggling)
A patch made against beta3 is attached.
(issue imported from #M2716)
Files
No data to display