I'm trying to get the difference between the current time and the filemtime in PHP.
The time and filemtime seems to return correct values, since, when applied to the date function, these values print correct dates. The difference between the time() function and filemtime is 1 hour according to the date function. However when I'm trying to get the difference between the returned timestamp values, the difference is 215. For example, see below:
current time = 1339599628, the date() function shows 13-06-2012 16:06:28 00 file modif time = 1339599413, the date() function shows 13-06-2012 15:06:30 30
This seems to be correct, but I can't see how to check the difference in seconds between these dates, since 1 hours has 3600 seconds, but the difference is only 215.
Also, I tried the following timestamp values: 1339599599 = 13-06-2012 15:06:59 59 1339599600 = 13-06-2012 16:06:00 00
So, the first timestamp values was incremented by 1, but the date gives 1 hours difference.
Any ideas?