Commands/time

From Minecraft Wiki
Jump to: navigation, search

Changes or queries the world's game time. In Bedrock Edition, time add, time query and time set are three separated commands.

Syntax
  • Java Edition
time <add|query|set> <value>
  • Bedrock Edition
time add <amount: int>
time set <amount: int>
time set <time: TimeSpec>
time query <daytime|gametime|day>
Arguments
value (BE: amount: int, time: TimeSpec, or daytime|gametime|day)
Specifies the time to add, query, or set:
  • add - Must be between 0 and 2,147,483,647 (inclusive, without the commas)
  • query - Must be daytime, gametime or day.
  • set - Must be between 0 and 2,147,483,647 (inclusive, without the commas), day, night, noon, midnight, sunrise[Bedrock Edition only], or sunset[Bedrock Edition only].
Result
Fails if the arguments are not specified correctly.
On success:
  • add - adds value to the world's game time.
  • query daytime - returns the number of game ticks since dawn.
  • query gametime - returns the age of the world in game ticks.
  • query day - returns the number of in-game days passed (matching the debug screen).
  • set - sets the world game time to value (day = 1,000, night = 13,000, noon = 6000, midnight = 18000, sunrise = 95,000‌[Bedrock Edition only], sunset = 84,000‌[Bedrock Edition only]).
Examples
To set the time to 1,000: time set 1000 or time set day
To add one day to the world time: time add 24000


History[edit]

Java Edition
1.3.112w16aAdded /time.
1.814w29aAdded /time query.
1.915w49b/time query now accepts day as a value.
1.1318w01aAdded the options noon and midnight to /time set.
Pocket Edition Alpha
0.16.0build 1Added /time.