implementing LocalDateTime into plugin.

Discussion in 'Spigot Plugin Development' started by NaJated, May 8, 2015.

  1. Hey all, I'm making a 'project' that is vary vary secret :pPP and I basicly at a certain time need to do some t'ings. Is this possible with a host / dedicated server and how would it know what the 'local' time is?
  2. Making an instance of Date...
    • Like Like x 1
  3. I think he means that Date will get the incorrect time (due to the server being in a different timezone). If that is the case, you can change your server time in order to fix that, or there may be a way to get a specific timezone (you'll have to look at the Javadocs).
  4. There's a TimeZone tzone = TimeZone.getTimeZone("ABBREVIATION e.g. PST or GMT");
  5. gigosaurus


    Date, TimeZone, etc has been made obsolete by the JDK8 Date-Time API, so unless your project is constrained to using JDK7, I'd have a look at that.
  6. Try it then? :p