Strangly enough, Bukkit/Spigot compare time to January 1, 1970, and also display that time in milliseconds.
Basically what this does for anyone interested, is gets the difference between the time you join and that date, and the time between the current time and that date, gets the difference between those values, and then converts it to days/hours.
The bonus to using it though, is that it always works. If you store time from the time the player joins, you can only compare current time to that time. In other words you can only track from the time you add the code to the server.
With this though, it compares it to the time stamp of the file created when you first join a server. So it is 100% accurate to the very day you actually joined.
Yeah but as I said in my comment, that only displays time based on when it was added, not when the player actually joined. I have seen many say they have been a member longer then what it shows, simply because of that. :)
EMC uses a database store so its consistent across all servers. Using that method would report different times on different servers. Though, I could always compare SMP1's getFirstPlayed to the database and if its older than DB, update DB to the older value, and that would correct people who joined before /p was added
Comments on Profile Post by VirtualJunky