Commands/time

From Minecraft Wiki
Jump to: navigation, search
time
Restrictions

Operator

First introduced

Beta 1.3 (1.3)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

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

Syntax[edit]

  • Java Edition
time add <time>
time query (daytime|gametime|day)
time set (<TimeSpec>|<time>)
  • Bedrock Edition
time add <amount: int>
time set <amount: int>
time set <time: TimeSpec>
time query <daytime|gametime|day>

Arguments[edit]

<time> (BE: amount: int)

Specifies the time to add or set. Must be between 0 and 2^31 - 1 (inclusive, without the commas).

(daytime|gametime|day) (BE: daytime|gametime|day)

Specifies the time to query. Must be daytime, gametime or day.

<TimeSpec> (BE: time: TimeSpec)

Specifies the time to set. Must be day, night, noon, midnight, sunrise[Bedrock Edition only], or sunset[Bedrock Edition only].

Result[edit]

Fails if the arguments are not specified correctly.

On success:

  • add - adds <time> to the world's daytime.
  • 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 in Java Edition).
  • set - sets the world daytime to <time> or <TimeSpec>(day = 1,000, night = 13,000, noon = 6,000, midnight = 18,000, sunrise = 23,000‌[Bedrock Edition only], sunset = 12,000‌[Bedrock Edition only]).

Examples[edit]

  • 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 Beta
1.3Added /time. Both add and set can be used.
Java Edition
1.3.112w16a/time is now usable in singleplayer.
/time set now accepts day (equivalent to 0) and night (equivalent to 12500).
1.713w36a/time set day now is equivalent to 1000, and /time set night now is equivalent to 13000.
1.814w29aAdded /time query, accepting daytime and gametime.
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.