Closed PascalMinder closed 7 years ago
The lastSeen
field is a timestamp in milliseconds (long) representing the date when the beacon has been scanned for the last time!
I know that, but what I didn't know was, that the time is a unix timestamp with the ms added to it.
// calculate timestamp
$msTime = $lastSeen % 1000;
$unixTime = ($lastSeen - $msTime) / 1000;
Yep exactly.
A much simpler version would be to only remove the miliseconds if you want the time in seconds :
$unixTime = $lastSeen / 1000
Small note on this one, the timestamp is taken in the timezone from where the phone is setup.
What type of format has the lastSeen file if I use the logging function