I have about 1000 Android generated timestamps in a text file. Now, I need to check if the difference between two consecutive timestamps is lesser than threshold value. If yes, I need to add this TIME in MINUTES to a variable continously… If not, add the time in MINUTES in another variable…
How do I convert the timestamps into actual time . ONLY using PHP ! Or is there another way to do this without converting it to time? (because timestamps are random, just adding the consecutive differences does not help )
Assuming the timestamps are regular millisecond-resolution timestamps, then it’s just a matter of feeding them into PHP’s date() format, divided by 1000:
e.g.: