The Command Variable "currenttime" is off



So I recently set up Phantombot and have been enjoying the experience of a bot like Ankhbot, which is available on Mac. However when setting up my console command for “currenttime” I find that while the hour may be correct, the time as a whole is a few minutes behind. For instance, earlier when I tested the command, I did so using the command !mytime, which I had setup as following:

“It is currently: (currenttime GB, HH:MM)”

You can see from the above Twitch chat that I sent the currenttime request at 9:29pm/21:29, yet the command brought back a time 20 minutes prior. I do not know how to get the “Console output,” but there were no errors reported in the terminal window at the time, and it showed my request through the command “!mytime” and the result exemplified in the screenshot above. If repliers let me know how to get the console output, I will get on that.

Thank you in advance

PhantomBot Version: 2.3.8
OS Version: Mac OS: 10.12.5
Java Version: Java 8 Update 144
Browser and Version (for Panel Support): Google Chrome: Version 60.0.3112.113 (Official Build) (64-bit)
Stock PhantomBot: Yes


You’re using a capital M to show your minutes, which means current month in Java, change it to mm for minutes.


Thank you so much! I didn’t realise that the capitalisation was important, I’m so new to Java! I will get on that right away. I really appreciate the quick response —I’ll also change the HH to hh in light of that, just to make it consistent


Also your computer can just be out of sync, you can use something like NTP to make sure your computer is sync’d as accurately as possible this guide provides a rough outline of what you need (pick a server closest to you, use google).


ScaniaTV’s response was right — the command worked, thank you.

1 Like

How do I get this current time to work??


Go here: Command Variables

1 Like
closed #8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.