Commands/time

From Minecraft Wiki
Jump to: navigation, search
time
Restrictions

Operator

First introduced

1.3.1 (12w16a)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

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

Syntax
  • Java Edition
time <add|query|set> <value>
  • Pocket Edition
time add <amount: int>
time query <time: string>
time set <amount: int>
Arguments
value (PE: amount: int or time: string)
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, or night.
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).
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