Daylight cycle



The day-night cycle is a 20 minute long lapse between two main light settings.

Conversions


In Minecraft, time is exactly 72 times faster than normal time. This can be easily calculated as the proportion $1440/20$ = 72, since there are 1440 minutes in a real day (60min × 24hr) and 20 minutes in a full Minecraft day. A collection of time unit conversions is listed below:

Real time to Minecraft time
The approximation of real time to Minecraft time:

Daytime


Daytime is the longest section of the cycle, lasting 10 minutes.

When a player first spawns in singleplayer, the day-night cycle will always start at the beginning of the daytime (0:00). Most multiplayer servers also start at the beginning of daytime, but the day-night cycle continues regardless of any new players joining.

During the daytime, the Sun rises up to its zenith in a light blue sky. The exact color of the sky depends on the current biome; for example desert skies are a lighter shade of blue than plains skies.

At approximately noon, all blocks that are in direct vertical view of the sky receive sunlight at light level 15, which is the maximum. Sunlight provides ample light for the growth of saplings, grass blocks and crops. Most undead mobs (including zombies and skeletons) exposed to direct sunlight (and are not in shade, in water, or wearing helmets) will be set on fire. Additionally, sunlight will render spiders neutral, unless they are currently chasing the player, and any endermen exposed to sunlight will teleport randomly when near the player and become neutral if already aggressive.

During the day, daylight sensors have the highest output level.

Sunset/dusk


Sunset is the period between daytime and nighttime, and always lasts $1 1/2$ minutes.

During sunset, the Sun descends on the western horizon, and the Moon rises on the eastern horizon. The sky near the setting Sun glows a vibrant orange-red. The Sun will also grow visibly larger as it sets.

The light level of all blocks that are in direct vertical view of the sky, and are not lit by other light sources, decreases by 1 every 10 seconds.

Between dusk and dawn, players may sleep in a bed. In singleplayer mode, doing so will advance the day-night cycle to dawn and set the weather to clear. This will also occur in multiplayer, so long as every player online is in a bed simultaneously. Time does not pass with regards to other aspects of the world, however; for example, crops will not grow faster, and furnaces will not cook food faster.

Nighttime


Nighttime lasts 7 minutes.

During the night, the Moon rises to its zenith in a dark blue sky dotted with small white stars. The stars appear to move with the Moon, and can be first seen towards the end of the sunset.

During nighttime, the world is covered in darkness; the light level falls to a minimum of 4, which allows hostile mobs to spawn on the surface. The exact duration for which hostile mobs are able to spawn in exposed areas is 9625 ticks. Regardless of the low light level, crops will continue to grow during the night.

During the night, inverted daylight sensors have the highest output level.

Sunrise/dawn


Sunrise is the period between nighttime and daytime, and always lasts $1 1/2$ minutes.

During sunrise, the Moon sets on the western horizon and the Sun rises on the eastern horizon. The sky near the rising Sun will glow a vibrant orange. The sun will also appear visibly larger as it rises, but will slowly shrink to its 8x8 pixel size while rising.

All blocks that are in direct vertical view of the sky will grow 1 light level brighter every 10 seconds. Eventually, the effects of sunlight will return, dissipating the threat of most hostile mobs.

Morning twilight begins after 22009 ticks, which is the equivalent of 4:00:32 in real time. The exact last time hostile mobs can spawn in exposed areas is 22812 (04:48:43) on clear mornings and 23031 (05:01:08) on rainy mornings.



Clocks
Clocks allow players to determine Minecraft time. They are useful underground where the current day/night cycle is not visible. They help the player avoid mistakenly surfacing at night and falling prey to night-spawned mobs on the surface.

Clocks will spin uselessly in the Nether and the End, since there is no day-night cycle in those dimensions.

Commands
If commands are enabled, then it is possible to change the current time with the commands, as detailed below. To enable or disable the day-night cycle, use the following command:

Set time
Specific times can be set with the command.
 * Syntax:

Examples:
 * - Sets the time to dawn/sunrise.
 * - Sets the time to 1000.
 * - Sets the time to midday/noon.
 * - Sets the time to dusk/sunset.
 * - Sets the time to 13000.
 * - Sets the time to midnight.

Moon phases
Each day that progresses adds 24000 ticks to the time counter. While each day looks the same, the Moon will go through one of its 8 different phases each night. Although there is no explicit command to change the Moon's phase, using will advance the Moon to its next phase. Furthermore, any of the phases can be accessed with the use of one of the following commands:
 * - Full Moon
 * - Waning Gibbous
 * - Last Quarter
 * - Waning Crescent
 * - New Moon
 * - Waxing Crescent
 * - First Quarter
 * - Waxing Gibbous

Trivia

 * The sun and moon rotate around the player, not the center of the map.
 * They will always remain in the same position relative to the stars, and to each other.
 * Due to this fact, eclipses in Minecraft are currently impossible.
 * Day and night do not proceed when a singleplayer game is paused. This does not apply when a GUI window (such as the inventory) is opened.
 * In multiplayer, this is not the case; time proceeds normally as long as the server is on.
 * Standing or flying at a height above the terrain at approximately 1.4x the render distance, the sun and moon will both be visible, giving the impression that the player is in space.
 * The day-night cycle will continue while the player is in the Nether or the End, although the world itself will not change until the Overworld is loaded again.
 * Background game music is triggered at specific times of the day-night cycle.
 * The highest value of time that can be set with the command is 2147483647.
 * This is equivalent to: Day = 89478   Tick = 11483   Real-time Equivalent (since the first day ever) [DD/MM/YYY (HH:MM:SS:MlMlMl)] = 24/12/244 (11:28:58:800) (8 days + 6 hours back due to leap years) Without Leap Years = 1/1/245 (17:28:58:800). Elapsed Time: approx. 345 days 5 hours.
 * Using NBT editors, the largest time value that can be set is 9223372036854775807 (2^63 - 1). After this point, the day/night cycle cannot progress. At this time, 384307168202282 days will have elapsed, or roughly 1.05 trillion years.
 * In Bedrock Edition, using /time set -174000 will cause the moon to either turn into rings, all moon phases, or a glitched looking beacon moon.