Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/time

From SAS Gaming Wiki
Revision as of 20:14, 9 April 2026 by SyncBot (talk | contribs) (Fix template calls: add MC/ prefix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Infobox command

Changes or queries the world's game time or the time of a world clock.

Usage

There are four types of time involved in this command:

  • Gametime - The total number of game ticks that have elapsed in the world.
  • Daylight cycle time (aka. internal daytime) - The total number of game ticks that have elapsed during the daylight cycle. It does not elapse when the game rule Template:Gmr is false.
  • Daytime - The number of game ticks that have elapsed since sunrise on current day. It is the result of dividing the daylight cycle time modulo 24,000.
  • Day - The number of days that have elapsed during the daylight cycle. It is the result of floor division by 24,000 of the daylight cycle time.

in Template:Editions, if the world is frozen by the

  1. REDIRECT Template:Command

Template:Redr command, the four times above do not elapse.

  • World clock time - the time the world clock is set to.

/time set ... command in Template:Editions always directly sets the daylight cycle time to the specified number. But in Template:Editions, when

  1. REDIRECT Template:Code

Template:Redr is specified, it increases the daylight cycle time to meet the specified

  1. REDIRECT Template:Code

Template:Redr.

For example:

in Template:Editions, when executing /time set day or /time set 1000, the daylight cycle time is set to 1000, so the "day" value returns to 0.
in Template:Editions, when executing /time set 1000, the daylight cycle time is also set to 1000. But, for /time set day, if now the daylight cycle time is 25001 (1 day + 1001 ticks), after executing /time set day, it won't become 1000 or 25000, since it only increases the daylight cycle time when using
  1. REDIRECT Template:Code

Template:Redr. In fact, it turns into 49000 (2 days + 1000 ticks), and the "day" value becomes 2. If now the daylight cycle time is 25000 (1 day + 1000 ticks), after executing /time set day, it remains unchanged.

Syntax

  • Java Edition
time add <time>
time of <clock> add <time>
Adds <time> to the specified world clock's daylight cycle time.
time pause
time of <clock> pause
Pauses the specified world clock.
time query gametime
Queries the number of game ticks that have passed in the world.
time query time
time of <clock> query time
Queries the number of game ticks that have passed in a <clock>.
time query <timeline> repetition
time of <clock> query <timeline> repetition
Queries the number of repetitions that have passed using <clock>'s timeline <timeline>.
time query <timeline>
time of <clock> query <timeline>
Queries the number of game ticks passed in this repetition of <clock>'s timeline <timeline>.
time resume
time of <clock> resume
Resumes the specified world clock
time set (<time>|<timemarker>)
time of <clock> set (<time>|<timemarker>)
Sets the specified world clock's daylight cycle time to the specified time or time marker (Template:Cd.
  • Bedrock Edition
time add <amount: int>
Adds <time> to the daylight cycle time.
time query <daytime|gametime|day>
Queries current time.
time set <amount: int>
time set <time: TimeSpec>
Sets the daylight cycle time.

Arguments

Template:El<time>: time
Template:El: amount: int: int

Specifies the time to add or set.
{{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|time}}{{#vardefine:be-arg|integer}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}

Template:Code

Specifies the time to query. Must be daytime, gametime or day.
  1. REDIRECT Template:Edition

Template:Rcat: Template:Code

  1. REDIRECT Template:Edition

Template:Rcat: time: TimeSpec: enum

Specifies the time to set.
Must be day, night, noon, midnight, sunriseTemplate:Only, or sunsetTemplate:Only.
  1. REDIRECT Template:Edition

Template:Rcat: <clock>: resource

Specifies the world clock to operate on. If not specified (
  1. REDIRECT Template:Command

Template:Redr instead of

  1. REDIRECT Template:Command

Template:Redr), defaults to the default world clock of the dimension of execution. Currently, only the Minecraft:Overworld and Minecraft:the End have default world clocks, which are

  1. REDIRECT Template:Code

Template:Redr and

  1. REDIRECT Template:Code

Template:Redr respectively.

Executing without specifying a world clock in a dimension without a default world clock raises an error.
Must be a namespaced Minecraft:identifier of a registry registered in the
  1. REDIRECT Template:Code

Template:Redr registry.

  1. REDIRECT Template:Edition

Template:Rcat: <timemarker>: resource

Specifies the time marker to set the time to
Must be a namespaced identifier. Upon execution, the command either attempts to retrieve an unregistered item based on this identifier, or send it to the client for processing.
  1. REDIRECT Template:Edition

Template:Rcat: <timeline>: resource

Specifies the timeline to query.
Must be a namespaced identifier of a registry registered in the
  1. REDIRECT Template:Code

Template:Redr registry.

Result

Template:Message boxTemplate:Article other Template:Result table Template:Result table Template:Result table Template:Result table

Output

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the daytime (the daylight cycle time modulo 24000) after execution}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/time add ...
/time set ...
}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the obtained value}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|/time query ...}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:commands-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:command-{{#var:commands-num}}|Any}}{{#vardefine:command-row-{{#var:commands-num}}|1}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}

{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}

Examples

  • To set the daylight cycle time to 1,000: time set 1000
  • To add one day to the daylight cycle time: time add 24000
  • To change/reset in-game day count to desired number: time set <desired day number*24000+time of day in ticks>; to change day count to day 472 at noon (6000): time set 11334000

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

External links

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

de:Befehl/time es:Comandos/time ja:コマンド/time pt:Comandos/time ru:Команды консоли/time uk:Команди консолі/time zh:命令/time