{{redirect|Time|the command|Commands/time}}
[[File:Day Night.gif|480px|thumb|right|A time-lapse of the daylight cycle.]]
The '''daylight cycle''' is a 20-minute-long cycle between two main [[light]] settings.

== Behavior ==
During the daylight cycle, the [[sun]] and [[moon]] appear to rotate around the player, appearing directly overhead at midday and midnight, respectively. The sun and moon always remain in the same position relative to the stars, and to each other. Solar eclipses are therefore impossible, and technically the moon would constantly be eclipsed by the world, even though it exhibits phases depending on the number of nights elapsed.

{{IN|bedrock}}, the daylight cycle never pauses unless the game is shut down. If the game is paused, the cycle continues. {{IN|java}}, the daylight cycle pauses when a single-player game is paused unless a GUI window (such as the inventory) is opened. In multiplayer, time proceeds normally as long as the server is running.

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. A [[village]] created in another dimension observes a normal village schedule.

== Conversions ==
In ''[[Minecraft]]'', time is exactly 72 times faster than normal time. This can be easily calculated as the proportion {{frac|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:[[File:Day Night Clock 24h.png|240px|thumb|right|A chart showing the approximations of Minecraft time to real time.]]

=== Minecraft time to real time ===
{| class="wikitable" data-description="Minecraft time to real time"
! Minecraft time !! Minecraft [[tick]]s!! Real time
|-
| 1 second || 0.2<span style="text-decoration: overline;">7</span>|| 0.013<span style="text-decoration: overline;">8</span> seconds
|-
| 1 minute || 16.<span style="text-decoration: overline;">6</span>|| 0.8<span style="text-decoration: overline;">3</span> seconds
|-
| 1 hour || 1,000 || 50 seconds
|-
|'''1 day'''||'''24,000'''||'''20 minutes'''
|-
| 1 week (7 days) || 168,000 || 2.<span style="text-decoration: overline;">3</span> hours (2h 20min)
|-
| 1 [[moon|lunar cycle]] (8 days) || 192,000 || 2.<span style="text-decoration: overline;">6</span> hours (2h 40min)
|}

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

{| class="wikitable" data-description="Real time to Minecraft time"
! Real time !! Minecraft time
|-
| 1 tick || 3.6 seconds
|-
| 1 second || 1 minute and 12 seconds (72 seconds)
|-
| 10 seconds || 12 minutes (720 seconds)
|-
| 50 seconds || 1 hour (60 minutes, 3600 seconds)
|-
| 1 minute || 1 hour and 12 minutes (72 minutes, 4320 seconds)
|-
|'''20 minutes'''
|'''1 day'''
|-
| 1 hour || 3 days
|-
| 1 day ||72 days
|-
| 1 month || 2,160 days
|-
| 1 year (365.24 Days) || 26,297 days (To the nearest day)
|}
[[File:Day_tick_cycle.png|frameless|width=1273x1273]]

{{Calculator|tick}}

== 24-hour ''Minecraft'' day ==
{| class="wikitable" style="text-align: center;" data-description="24-hour Minecraft day"
! Image
! Minecraft<br>time of day
! Minecraft<br>ticks
! Real time<br>(minutes)
! Event
|-
| style="background-color: #709DED; border-bottom-color: #709DED;" |{{ClockPhase|0}}
| 06:00:00.0
| 0<br>(24000)
| 0:00<br>(20:00)
| style="text-align: left;" |'''Beginning of the ''Minecraft'' day.'''<br />Players and villagers awaken and rise from their beds.
|-
| style="background-color: #709DED; border-bottom-color: #709DED;" |
{{ClockPhase|167}}
| 06:10:01.2
| 167
| 0:08.35
| style="text-align: left;" | The moon disappears on the horizon.
|-
| style="background-color: #78A9FF; border-bottom-color: #78A9FF;" |{{ClockPhase|1000}}
| 07:00:00.0
| 1000
| 0:50
| style="text-align: left;" | Time when using the {{cmd|time set day}} command.
|-
| style="background-color: #78A9FF; border-bottom-color: #78A9FF;" |{{ClockPhase|2000}}
| 08:00:00.0
| 2000
| 1:40
| style="text-align: left;" | Villagers begin their workday.
|-
| style="background-color: #78A9FF; border-bottom-color: #78A9FF;" |{{ClockPhase|5723}}
| 11:43:22.8
| 5723
| 4:46.15
| style="text-align: left;" |The clock starts showing exactly midday.
|-
| rowspan="2" style="background-color: #78A9FF; border-bottom-color: #78A9FF;" |{{ClockPhase|6000}}
| rowspan="2" | 12:00:00.0
| rowspan="2" | 6000
| rowspan="2" | 5:00
| style="text-align: left;" |'''Noon'''; the sun is at its peak.
|-
| style="text-align: left;" | Time when using {{cmd|time set noon}}.
|-
| style="background-color: #78A9FF; border-bottom-color: #78A9FF;" |{{ClockPhase|9000}}
| 15:00:00.0
| 9000
| 7:30
| style="text-align: left;" | Villagers end their workday and begin socializing.
|-
| style="background-color: #709DED; border-bottom-color: #709DED;" |
{{ClockPhase|11834}}
| 17:50:02.4
| 11834
| 9:41.7
| style="text-align: left;" | The moon appears on the horizon.
|-
| style="background-color: #709DED; border-bottom-color: #709DED;" |{{ClockPhase|12000}}
| 18:00:00.0
| 12000
| 10:00
| style="text-align: left;" |'''Beginning of the ''Minecraft'' sunset.'''
Time when using the {{cmd|time set sunset}}{{only|bedrock}} command. <br />Villagers go to their beds and sleep.
|-
| style="background-color: #6F9CEC; border-bottom-color: #6F9CEC;" |{{ClockPhase|12010}}
|18:00:36.0
| 12010
|10:00.5
| style="text-align: left;" |In rainy weather, beds can be used at this point.
In rainy weather, the [[light|internal sky-light level]] begins to decrease.

In rainy weather, [[Creaking|creakings]] start to spawn.
|-
| style="background-color: #6D99E8; border-bottom-color: #6D99E8;" |{{ClockPhase|12040}}
|18:02:24.0
|12040
|10:02
| style="text-align: left;" |In sunny weather, the [[light|internal sky-light level]] begins to decrease.
|-
| style="background-color: #4C6BA2; border-bottom-color: #4C6BA2;" |{{ClockPhase|12542}}
| 18:32:31.2
| 12542
| 10:27.1
| style="text-align: left;" |In clear weather, beds can be used at this point.<br />In clear weather, bees enter the nest/hive for the night.<br />In clear weather, undead mobs no longer burn.
In clear weather, creakings start to spawn.
|-
| style="background-color: #486599; border-bottom-color: #486599;" |{{ClockPhase|12610}}
|18:36:36.0
|12610
|10:30.5
| style="text-align: left;" |The clock shows exactly dusk (day to night).
|-
| style="background-color: #3C547F; border-bottom-color: #3C547F; " |{{ClockPhase|12786}}
| 18:47:09.6
|12786
|10:39.3
| style="text-align: left;" |The solar zenith angle is 0. Horizon stops getting darker.
|-
| style="background-color: #304365; border-bottom-color: #304365;" |{{ClockPhase|12969}}
|18:58:08.4
|12969
|10:48.45
| style="text-align: left;" |First tick when monsters spawn outdoors in rainy weather.<ref group="note" name="spawn-before-redstone">Time of day measured by the first time [[commands]] are executed ''after'' the spawn cycle.</ref>
|-
| style="background-color: #2D4061; border-bottom-color: #2D4061;" |{{ClockPhase|13000}}
|19:00:00.0
|13000
|10:50
| style="text-align: left;" |'''Beginning of the ''Minecraft'' night.'''
Time when using the {{cmd|time set night}} command.
|-
| style="background-color: #212E46; border-bottom-color: #212E46;" |{{ClockPhase|13188}}
|19:11:16.8
|13188
|10:59.4
| style="text-align: left;" |First tick when monsters spawn outdoors in clear weather.<ref group="note" name="spawn-before-redstone" />
|-
| style="background-color: #212E46; border-bottom-color: #212E46;" |{{ClockPhase|13670}}
|19:40:12.0
|13670
|11:23.5
| style="text-align: left;" |The [[light|internal sky-light]] level reaches 4, the minimum at night.
|-
| style="background-color: #212E46; border-bottom-color: #212E46;" |{{ClockPhase|13702}}
| 19:42:07.2
|13702
| 11:25.1
| style="text-align: left;" |The sun disappears on the horizon.
|-
| style="background-color: #000000; border-bottom-color: #000000;" |{{ClockPhase|17843}}
|23:50:34.8
|17843
|14:52.7
| style="text-align: left;" |The clock starts showing exactly midnight.
|-
| rowspan="2" style="background-color: #000000; border-bottom-color: #000000;" |{{ClockPhase|18000}}
| rowspan="2" |00:00:00.0
| rowspan="2" |18000
| rowspan="2" |15:00
| style="text-align: left;" |'''Midnight'''; the moon is at its peak.
|-
| style="text-align: left;" |Time when using the {{cmd|time set midnight}} command.
|-
| style="background-color: #212E46; border-bottom-color: #212E46;" |{{ClockPhase|22300}}
|04:18:00.0
|22300
|18:35
| style="text-align: left;" |The sun appears on the horizon.
|-
| style="background-color: #212E46; border-bottom-color: #212E46;" |{{ClockPhase|22331}}
|04:19:51.8
|22331
|18:36.55
| style="text-align: left;" |The [[Light|internal sky-light level]] begins to increase.
|-
| style="background-color: #212E46; border-bottom-color: #212E46;" |{{ClockPhase|22812}}
| 04:48:43.2
|22812{{Only|java}}
|19:00.6
| rowspan="2" style="text-align: left;" |Last tick when monsters spawn outdoors in clear weather.<ref group="note" name="spawn-before-redstone" />
|-
| style="background-color: #212E46; border-bottom-color: #212E46;" |{{ClockPhase|22813}}
|04:48:46.8
|22813{{Only|bedrock}}
|19:00.65
|-
| style="background-color: #2D4061; border-bottom-color: #2D4061;" |{{ClockPhase|23000}}
| 05:00:00.0
|23000
|19:10
| style="text-align: left;" |'''Beginning of the ''Minecraft'' sunrise.'''
Time when using the {{cmd|time set sunrise}}{{only|bedrock}} command.
|-
| style="background-color: #304365; border-bottom-color: #304365;" |{{ClockPhase|23031}}
|05:01:51.6
|23031
|19:11.55
| style="text-align: left;" |Last tick when monsters spawn outdoors in rainy weather.<ref group="note" name="spawn-before-redstone" />
|-
| style="background-color: #304467; border-bottom-color: #304467;" |{{ClockPhase|23041}}
|05:02:27.6
|23041
|19:12.1
| style="text-align: left;" |The clock starts showing exactly dawn.
|-
| style="background-color: #3C547F; border-bottom-color: #3C547F;" |{{ClockPhase|23216}}
|05:12:57.6
|23216
|19:20.8
| style="text-align: left;" | The solar zenith angle is 0.
|-
| style="background-color: #4C6BA2; border-bottom-color: #4C6BA2;" |{{ClockPhase|23460}}
|05:27:36.0
|23460
|19:33
| style="text-align: left;" |In clear weather, beds can no longer be used.<br />In clear weather, bees leave the nest/hive.<br />In clear weather, undead mobs begin to burn.
In clear weather, creakings begin to despawn.
|-
| style="background-color: #6D99E8; border-bottom-color: #6D99E8;" |{{ClockPhase|23961}}
|05:57:39.6
|23961
|19:58.1
| style="text-align: left;" |In sunny weather, the [[light|internal sky-light]] level reaches 15, the maximum. Horizon stops getting brighter.
|-
| style="background-color: #6F9CEC;" |{{ClockPhase|23992}}
|05:59:31.2
|23992
|19:59.6
| style="text-align: left;" |In rainy weather, beds can no longer be used.
In rainy weather, the [[light|internal sky-light]] level reaches 12, the maximum.

In rainy weather, creakings begin to despawn.
|}

{{Anchor|Day}}
=== Daytime ===
[[File:Survival.png|thumb|right|300px|This is the start of a new day.]]

Daytime, not including sunset and sunrise, is equal in length to nighttime, lasting 9 minutes and 10 seconds.

*Start: 1000 ticks (07:00:00.0)
*Mid: 6000 ticks (12:00:00.0)
*End: 12000 ticks (18:00:00.0)

When a [[player]] first [[spawn]]s 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 [[sapling]]s and [[grass block]]s. Most [[undead]] mobs (including [[zombie]]s and [[skeleton]]s) exposed to direct sunlight (and are not in shade, in [[water]], or wearing [[helmet]]s) are set on fire. Additionally, sunlight renders [[spider]]s neutral, unless they are currently chasing a [[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. For more details see [[Effects of light|Light § Effects of light]].

{{Anchor|Dusk|Sunset}}

=== Sunset/dusk ===
[[File:A sunset.png|300px|thumb|Example sunset seen from a high spot on the map.]]

Sunset is the period between daytime and nighttime, and always lasts 50 seconds.

*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 [[furnace]]s do not cook or smelt as they would when players are awake.

{{Anchor|Night}}
[[File:TundraNight.png|300px|thumb|A snowy tundra biome during the night; various mobs can be seen.]]
=== Nighttime ===
{{Redirect|Night|night in ''Minecraft Dungeons''|MCD:Night}}Nighttime lasts 9 minutes and 10 seconds.

*Start: 13000 ticks (19:00:00.0)
*Mid: 18000 ticks (00:00:00.0)
*End: 24000 ticks (06: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 mob]]s to spawn on the surface. The exact duration for which hostile mobs are able to spawn in exposed areas is 13188 ticks.<ref group="note" name="spawn-before-redstone" />

Regardless of the low [[internal sky light]] level, crops continue to grow during the night as long as they have sufficient [[client light|client]]{{Only|short=1|Java}} or [[Internal light level|internal]]{{Only|short=1|Bedrock}} light level, and at least one player is not sleeping to avoid skipping the night.<ref group="note">The percentage of players that need to be asleep to skip a night is controlled by the gamerule {{cd|playersSleepingPercentage}}.</ref>

[[File:Sunrise.png|300px|thumb|Example of the Sun rising in the horizon.]]

{{Anchor|Dawn|Sunrise}}

=== Sunrise/dawn ===
Sunrise is the period between nighttime and daytime, and always lasts 50 seconds.

*Start: 0 ticks (06:00:00.0)
*End: 1000 ticks (07: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.

[[File:WatchCycle.gif|right]]

== Clocks ==
{{main|Clock}}

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 [[dimension]]s.

== Commands ==
If [[commands]] are enabled, then it is possible to change the current time with the {{cmd|time}} commands, as detailed below. To enable or disable the daylight cycle, use the following command: {{cmd|gamerule doDaylightCycle true{{!}}false}}

=== Set time ===
Specific times can be set with the {{cmd|time set}} command.

: Syntax: <code>'''/time''' set <''number''{{!}}day{{!}}noon{{!}}sunset{{!}}night{{!}}midnight{{!}}sunrise></code>

Examples:
:{{cmd|time set 0}} – Sets the time to the beginning of the Minecraft day.
:{{cmd|time set day}} – Sets the time to 1000.
:{{cmd|time set 12000}} – Sets the time to dusk/sunset.
:{{cmd|time set sunrise}}{{only|bedrock}} - Sets the time to 23000.
:{{cmd|time set noon}} - Sets the time to 6000.

=== 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. The phase of the moon can also alter some events in game such as [[Slime]] spawning and [[Spider]] effects. Although there is no explicit command to change the Moon's phase, using {{cmd|time add 24000}} advances the Moon to its next phase. Using {{cmd|/time set midnight}} also sets the moon's phase to fullmoon no matter what. Furthermore, any of the phases can be accessed with the use of one of the following commands:

*{{cmd|time set 14000}} – Full moon
*{{cmd|time set 38000}} – Waning gibbous
* {{cmd|time set 62000}} – Third quarter
*{{cmd|time set 86000}} – Waning crescent
*{{cmd|time set 110000}} – New moon
*{{cmd|time set 134000}} – Waxing crescent
*{{cmd|time set 158000}} – First quarter
*{{cmd|time set 182000}} – Waxing gibbous

== Achievements ==
{{load achievements|Passing the Time;Castaway;Sleep with the Fishes}}

== Video ==
{{yt|WksRNGVKqP0}}

== Graph ==
[[File:MCTimegraph.png|alt=Chart of daily events.|thumb|left|upright=4.0|A graph of the events in a day.]]
{{-}}

== History ==
{{HistoryTable
|{{HistoryLine|java indev}}
|{{HistoryLine||20100211|Added the daylight cycle, as well as the [[sun]] and the [[moon]].
|Currently, each cycle lasts about 15 minutes, with day and night each lasting 7.5 minutes.}}
|{{HistoryLine||20100212-1210|Daylight cycle now lasts 20 minutes.
|Stars now appear in the night sky.}}
|{{HistoryLine|java infdev}}
|{{HistoryLine||20100227-1414|Removed the daylight cycle.}}
|{{HistoryLine||20100313|Reimplemented the daylight cycle, however with a 16 minute duration instead of 20.}}
|{{HistoryLine||20100316|The daylight cycle is now again 20 minutes.}}
|{{HistoryLine|java beta}}
|{{HistoryLine||1.5|The stars at night are now darker.}}
|{{HistoryLine||1.8|dev=Pre-release|In the leaked 1.8 pre-release version, the player can manipulate the time by pressing {{key|F6}} to reverse time and {{key|F7}} to advance time.
|Daylight cycles no longer require chunk updates and are now a smooth transition.}}
|{{HistoryLine|java}}
|{{HistoryLine||1.0.0|dev=Beta 1.9 Prerelease 4|[[Notch]] mentioned on his Twitter that the Sun actually rose in the north in Minecraft.<ref>{{Tweet|notch|88155424880201728|yes :(}}</ref> This was a bug and was fixed in Beta 1.9 Prerelease 4, so the Sun and Moon now both rise in the east;<ref>{{Tweet|notch|124414532847284224|Aaaand now the sun rises in the east. #breakallthesunrises}}</ref> this also changed the South-West rule to the [[South-East rule]].
|Added [[Wikipedia:Lunar phase|lunar phases]].<ref>{{Tweet|notch|124251105277386752|Uhm. I'll fix that. :/}}</ref><ref>http://www.reddit.com/r/Minecraft/comments/la87q/notch_is_implementing_moon_phases/c2r4hjg</ref>}}
|{{HistoryLine||1.3.1|dev=12w21a|The stars that appear at night were updated to be slightly smaller.}}
|{{HistoryLine||1.5|dev=13w01a|Daylight sensors determine what time of day it is by outputting a redstone signal.}}
|{{HistoryLine||1.6.1|dev=13w24a|{{cmd|gamerule doDaylightCycle}} added, which turns the daylight cycle on or off.}}

|{{HistoryLine|pocket alpha}}
|{{HistoryLine||v0.2.0|Added the daylight cycle.}}
|{{HistoryLine||v0.4.0|Increased the length of the daylight cycle from 14,400 ticks (12 minutes) to 19,200 ticks (16 minutes).}}
|{{HistoryLine||v0.5.0|The Nether reactor core sets the time to night.}}
|{{HistoryLine||v0.7.3|Added sunrises, sunsets, the Sun, the Moon, and stars.}}
|{{HistoryLine||v0.10.0|dev=build 1|Added the daylight cycle to creative mode.
|The time of day is now more accurately synced in multiplayer.
|Daylight cycles no longer require chunk updates and are now a smooth transition.}}
|{{HistoryLine||v0.11.0|dev=build 1|Added option to disable daylight cycle, in creative mode only.}}
|{{HistoryLine||v0.12.1|dev=build 1|Increased the length of the daylight cycle to 24,000 ticks.}}
|{{HistoryLine|pocket}}
|{{HistoryLine||1.1.0|dev=alpha 1.1.0.0|The sun and moon now rise in the east and set in the west. (Previously they rose in the north and set in the south.)}}
}}

== Trivia ==
*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 highest value of time that can be set with the {{cmd|time set}} command is 2,147,483,647 (2<sup>31</sup>−1; the 32-bit integer limit). This is equivalent to 89478 days and 11647 ticks. Real-time equivalent (counting from January 1, 1 [[Wikipedia:Common era|CE]], year 0 did not exist): 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 (2<sup>63</sup>−1; the 64-bit integer limit). After this point, the value overflows to be &minus;2<sup>63</sup>, and as it adds up, the daylight cycle progresses "backward". 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.

== Gallery ==
=== In other media ===
<gallery>
Survival JINX.gif|Official {{Wikipedia|glow-in-the-dark}} T-shirt artwork "Survival" featuring the daylight cycle. Made by JINX.
</gallery>

== Notes ==
{{notelist}}

== References ==
{{reflist}}

== Navigation ==
{{Navbox environment}}

[[cs:Cyklus dne a noci]]
[[de:Tag-Nacht-Rhythmus]]
[[es:Ciclo de día y noche]]
[[fr:Cycle jour-nuit]]
[[it:Ciclo giorno-notte]]
[[ja:昼夜サイクル]]
[[ko:밤낮의 순환]]
[[pl:Cykl dnia i nocy]]
[[pt:Ciclo de dia e noite]]
[[ru:Цикл дня и ночи]]
[[th:วัฏจักรเวลา]]
[[uk:Цикл день/ніч]]
[[zh:昼夜更替]]
