Minecraft

How to Change Time and Weather With Commands in Minecraft

time set day and weather clear fix most problems in one line each. Here are all the values, the units, and how to lock it permanently.

TheGameHosting Team 4 min read
Change Time and Weather in Minecraft
Background: Minecraft © Mojang Studios

The two commands you need are time set day and weather clear. Type them in the server console (no slash) or in chat as an operator, and the sun comes up and the rain stops at once. This guide lists every Minecraft time weather command value for Java and Bedrock, plus the game rules that stop the cycle for good.

Changes made with these commands are saved with the world, so you do not need to edit any file. What does need a little care is permissions, the duration of weather, and the game rule names, which changed in Java 1.21.11.

Use a Minecraft time weather command step by step

  1. Open your server in the panel and go to Console. Console commands run with full rights and go without a slash.
  2. Type time set day to jump to morning, or time set night for nightfall.
  3. Type weather clear to stop rain or a storm.
  4. Optional: add a duration, for example weather clear 1d on Java to keep the sky clear for one in-game day.
  5. To stop the cycle completely, set the game rules shown below and check the result in game.
Server console
time set day
weather clear
weather clear 1d

In chat the same commands start with a slash: /time set day. On Java a player needs permission level 2, which operators have by default. On Bedrock the level is 1, but the world must have cheats allowed. If you are not OP yet, follow how to OP yourself on a Minecraft server.

Time values: day, noon, night and more

A Minecraft day lasts 24,000 ticks. time set accepts a named value or a number of ticks, and time add moves the clock forward. According to the Minecraft Wiki these are the named values:

CommandTicksEdition
time set day1000Java and Bedrock
time set noon6000Java and Bedrock
time set sunset12000Bedrock only
time set night13000Java and Bedrock
time set midnight18000Java and Bedrock
time set sunrise23000Bedrock only

Java also accepts units: d is one day (24,000 ticks), s is one second (20 ticks) and t is one tick, the default. So time add 1d skips a full day and time add 30s moves the clock 600 ticks. Bedrock takes plain numbers without units, and adds time query daytime to check the current time of day.

Weather command: clear, rain and thunder

The weather command has three states: weather clear, weather rain and weather thunder. You can add how long it lasts:

  • Java: the duration takes the same units as time (d, s, t), so weather rain 10s or weather clear 2d both work. If you leave it out, the length is random: the Minecraft Wiki gives 12,000 to 180,000 ticks for clear skies and shorter ranges for rain and thunder.
  • Bedrock: the duration is in ticks only, between 0 and 1,000,000. If you leave it out or use 0, it picks a random length between 300 and 900 seconds. weather query tells you the current weather.
Server console
weather rain 10s
weather thunder 2d
weather clear

Since Java 1.20.5 the weather command also works when run from the Nether or the End, although those dimensions never show rain.

Freeze time or weather with game rules

If you want permanent daylight for a building server, or no rain ever, stop the cycle with a game rule instead of repeating the command. Java renamed every game rule in 1.21.11, so use the name that matches your version:

What it doesJava 1.21.11 and newerOlder JavaBedrock
Stops the day-night cyclegamerule advance_time falsegamerule doDaylightCycle falsegamerule dodaylightcycle false
Stops weather changesgamerule advance_weather falsegamerule doWeatherCycle falsegamerule doweathercycle false
Percent of players needed to skip the night by sleepinggamerule players_sleeping_percentage 50gamerule playersSleepingPercentage 50gamerule playerssleepingpercentage 50

The usual recipe for “always sunny” is to run time set noon and weather clear first, then turn off both cycles. If the rule name is rejected, you are on the other naming scheme; check your version in the Version tab. For a full update walkthrough see how to update a Minecraft server.

Lowering the sleep percentage is often the friendliest fix on an SMP: with 50, half the players in bed is enough to skip the night, and nobody has to type commands. Other world rules, such as keeping items on death, are covered in Minecraft server keep inventory.

Control your world from the panel with TheGameHosting

On TheGameHosting the Console tab works from any browser, so you can clear a storm or set the time from your phone without opening Minecraft. Schedules lets you run commands automatically at set times, and Users lets you give a trusted friend console access without sharing your password. Your server is ready about 60 seconds after payment and keeps the world running 24/7 without your PC.

Servers run on AMD Ryzen 9950X and 7950X3D processors with DDR5 memory and NVMe storage, with DDoS protection included and locations in Dallas and Amsterdam. Plans start at $1.90 a month for 2 GB, with unlimited slots and no setup fee, and support answers 24/7 by chat and tickets. Have a look at our Minecraft server hosting or go straight to plans and pricing, and use the code FULL2026 for 15% off for life.

FAQ

How do I make it day in Minecraft with a command?

Type /time set day in chat as an operator, or time set day in the server console. Use noon for the sun at its highest point.

How do I stop rain forever on my Minecraft server?

Run weather clear and then turn off the weather cycle: gamerule advance_weather false on Java 1.21.11 and newer, gamerule doWeatherCycle false on older Java, or gamerule doweathercycle false on Bedrock.

Why does /time say I don't have permission?

On Java you need permission level 2 (operator). On Bedrock you need to be an operator and the world must have cheats enabled. The server console always works.

Is doDaylightCycle gone?

On Java 1.21.11 and newer the rule is called advance_time. Older Java versions and Bedrock still use the old names.

Hosting for these games

Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.

All posts