forked from ChomeNS/chomens-bot-java
whopsiies
This commit is contained in:
parent
5ed45a658f
commit
c7ee378b46
1 changed files with 4 additions and 2 deletions
|
@ -48,9 +48,11 @@ public class SeenCommand extends Command {
|
|||
|
||||
final JsonObject lastSeen = playerElement.getAsJsonObject().get("lastSeen").getAsJsonObject();
|
||||
|
||||
if (lastSeen == null) return null;
|
||||
final JsonElement time = lastSeen.get("time");
|
||||
|
||||
final DateTime dateTime = new DateTime(lastSeen.get("time").getAsLong(), DateTimeZone.UTC);
|
||||
if (time == null) return null;
|
||||
|
||||
final DateTime dateTime = new DateTime(time.getAsLong(), DateTimeZone.UTC);
|
||||
|
||||
final DateTimeFormatter formatter = DateTimeFormat.forPattern("EEEE, MMMM d, YYYY, hh:mm:ss a z");
|
||||
final String formattedTime = formatter.print(dateTime);
|
||||
|
|
Loading…
Reference in a new issue