Daylight cycle



The daylight cycle is a 20-minute-long cycle 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 (86400 seconds) in a real day (3600sec × 24hr) and 20 minutes (1200 seconds) in a full Minecraft day, assuming the tick speed is maintained at 20 ticks/second. 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.


 * Start: 0 ticks (06:00:00.0)
 * Mid: 6000 ticks (12:00:00.0)
 * End: 12000 ticks (18:00:00.0)

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

During the daytime, the Sun rises up to its peak 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.

All blocks that are in direct vertical view of the sky receive sunlight at the internal sky-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) are set on fire. Additionally, sunlight renders spiders neutral, unless they are currently chasing the player, and any endermen exposed to sunlight teleport randomly when near the player and randomly become neutral if having been aggressive for at least 30 seconds.

Sunset/dusk


Sunset is the period between daytime and nighttime, and always lasts $5/6$ minutes.


 * Start: 12000 ticks (18:00:00.0)
 * End: 13000 ticks (19:00:00.0)

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 internal sky-light level decreases. Eventually, undead mobs exposed to direct sunlight are set not to burn.

Between dusk and dawn, players may sleep in a bed. In singleplayer mode, doing so advances the daylight cycle to dawn and sets the weather to clear. This also occurs in multiplayer as long as every player online is in a bed simultaneously. Time does not pass for other aspects of the world, however; for example, crops do not grow and furnaces do not cook or smelt as they would when players are awake.

Nighttime


Nighttime lasts $8 1/3$ minutes.


 * Start: 13000 ticks (19:00:00.0)
 * Mid: 18000 ticks (00:00:00.0)
 * End: 23000 ticks (05:00:00.0)

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

During the nighttime, the world is covered in darkness; the internal sky-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 13188 ticks. Regardless of the low light level, crops continue to grow during the night as long as one player is not sleeping.

Sunrise/dawn


Sunrise is the period between nighttime and daytime, and always lasts $5/6$ minutes.


 * Start: 23000 ticks (05:00:00.0)
 * End: 24000 (0) ticks (06:00:00.0)

During sunrise, the Moon sets on the western horizon and the Sun rises on the eastern horizon. The sky near the rising Sun glows orange.

The internal sky-light level increases. Eventually, the effects of sunlight return, dissipating the threat of most hostile mobs.



Clocks
A clock allows players to determine Minecraft time. A clock is useful while underground where the current day/night cycle is not visible. A clock helps the player avoid mistakenly surfacing at night and falling prey to night-spawned mobs on the surface.

Clocks spin uselessly in the Nether and the End, because there is no daylight 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 daylight 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 dusk/sunset.
 * - Sets the time to 23000.

Moon phases
Each day that progresses adds 24000 ticks to the time counter. While each day looks the same, the Moon appears in one of eight different phases each night. Although there is no explicit command to change the Moon's phase, using advances 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
 * – Third 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 always remain in the same position relative to the stars, and to each other.
 * Due to this fact, solar eclipses in Minecraft are currently impossible.
 * Also due to this fact, technically lunar eclipses (also known as blood moons) would happen every night.
 * $$, 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.
 * The sun and moon are both visible when standing or flying at a height above the terrain at approximately 1.4× the set render distance.
 * The daylight cycle continues while the player is in the Nether or The End, although the world itself does not change until the Overworld is loaded again. This can be observed if the player creates a village in another dimension and observes the schedule progressing as normal.
 * Background game music is triggered at specific times of the daylight cycle.
 * The highest value of time that can be set with the command is 2,147,483,647 (231−1; the 32-bit integer limit).
 * This is equivalent to 89478 days and 11647 ticks. Real-time equivalent (counting from January 1, 1 CE, year 0 not existed): December 25, 1581 CE at 11:28:58.8. Without leap years it would be January 1, 1582 CE at 17:28:58.8. Elapsed real-life time: approximately 1242 days (3 years and 147 days, ignoring leap years) and 18 hours.
 * Using NBT editors, the largest time value that can be set is 9,223,372,036,854,775,807 (263−1; the 64-bit integer limit). After this point, the value overflows to be &minus;263, and as it adds up, the day/night cycle progresses "backwards". At this time, 384,307,168,202,282 days, 7 hours, 48 minutes and 25.2 real-life seconds would have elapsed, or approximately 1,052,197,288,656.939773689169981 years.