Comments on Profile Post by VirtualJunky

  1. Roslyn
    Roslyn
    :D Ooooo ! Sneaky Sneaky BearryyBearrr
    Jun 5, 2014
  2. VirtualJunky
    VirtualJunky
    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.
    Jun 5, 2014
  3. VirtualJunky
    VirtualJunky
    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.
    Jun 5, 2014
  4. VirtualJunky
    VirtualJunky
    Anyway, that's how bored I am. How is everyone else doing? O.O
    Jun 5, 2014
  5. Roslyn
    Roslyn
    Meh, got 2 more finals today.. and meanwhile Im auctioning off DC's of random stuff I have.
    Jun 5, 2014
  6. mba2012
    mba2012
    It's even easier with the EMC system ;)
    Jun 5, 2014
  7. VirtualJunky
    VirtualJunky
    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. :)
    Jun 5, 2014
  8. mba2012
    mba2012
    I think /p uses a different system because its based on when /p was added, and not the current player data records.
    Jun 5, 2014
  9. VirtualJunky
    VirtualJunky
    That is what I was saying. >_>
    The code I linked would show when people actually joined.
    Jun 5, 2014
  10. mba2012
    mba2012
    Ah, thought you meant the other way :P
    Jun 5, 2014
  11. Aikar
    Aikar
    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
    Jun 9, 2014
  12. mba2012
    mba2012
    That'd be cool :D
    Jun 9, 2014
  13. Aikar
    Aikar
    and note, the date is only off for people who joined in like the first few months of EMC starting, so like 98% of members have the correct age.
    Jun 9, 2014