Day and night cycle

"Sun" redirects here. For the vanity mask, see Sun Mask.
For the cycle of the moon, see Moon phase.

> “You should stay indoors at night. It is very dangerous to be wandering around in the dark.
>
> — The Guide
>
>

The **day and night cycle** of the *Terraria* world refers to the rising and setting of the Sun and Moon, and the ways this can affect the world.

* Day begins at 4:30 AM, while night begins at 7:30 PM.
* Day and night each have their respective theme music in some surface biomes.
	+ For the "Morning Rain" track, morning lasts from 4:30 AM to 7:30 AM.
* Some surface enemies only spawn at night *(see Enemies below)*.
* Some NPCs sell unique items at night, like the Arms Dealer, who sells Illegal Gun Parts at night.

Note that the sun in Terraria rises at the left of the map, even though the left is referred to in-game as "West" (the same for right/East), e.g. when a Goblin Army, Frost Legion, or Pirate Invasion begins approaching.

## Time

Times

* All newly-created worlds begin at 8:15 AM.
* One minute of in-game time lasts one second of real-world time, meaning one hour in-game lasts one minute real-world. Therefore, one full *Terraria* day lasts 24 real-world minutes (15 during the day, 9 during the night).
* In-game time can be displayed with the following:
	+ Any placed Grandfather Clock will display the current hour for all players within ~80 tiles horizontal and ~50 tiles vertical of the clock. Using the `⚷ Interact` key on it displays the exact time in a status message.
	+ On PC, Console, Old-gen console, Mobile, Old Chinese, tModLoader, and tModLoader Legacy, having a Gold/Platinum Watch, GPS, PDA, or Cell Phone in the player's inventory displays the exact time (the Tungsten/Silver Watch and Tin/Copper Watch will display time to the nearest in-game half-hour and hour respectively).
	+ Time Hair Dye colors the character's hair dependent on the time, providing a rough estimate.
* Using the Enchanted Sundial, time can be sped up to the end of the current cycle (i.e. to 4:30 AM) once every seven days.
* Sleeping in Beds makes time pass at five times the normal rate. However, this cannot be done during events or when bosses are alive. This also works on multiplayer worlds, but requires all players to be in bed.
* Time can also be sped up  and frozen  using the power menu in Journey Mode.
	+ Time rate can be altered from 1× to 24× its normal rate (using 24×, an in-game day will last 1 real-world minute).
		- This effect will stack with a Bed. With just the Bed and Journey Mode, an in-game day can be passed in 12 real-world seconds. The Enchanted Sundial negates the Bed and Journey Mode, and works on its own.
	+ Furthermore, it is possible to set time to one of four presets:
		- ​ Dawn (04:30 AM)
		- ​ Noon (12:00 PM)
		- ​ Dusk (07:30 PM)
		- ​ Midnight (12:00 AM).

## Enemies

At the surface layer, unique enemies spawn at night. Nocturnal enemies will run or fly away when day starts.

Additionally, Eye of Cthulhu, Skeletron, The Twins, The Destroyer, Skeletron Prime and Ocram can only be summoned at night, and will flee or become nigh-unkillable at dawn. In contrast, King Slime can only spawn randomly during the day, though it can be summoned with the Slime Crown at any time.

The following enemies only spawn during the night:

Pre-Hardmode
* Demon Eye
* Raven(during Halloween)
* Zombie(numerous variants)

Hardmode
* Gastropod(The Hallow)
* Giant Flying Fox(Jungle)
* Hoppin' Jack(during Halloween)
* Ice Elemental(Snow biome)
* Possessed Armor
* Wandering Eye
* Werewolf(during a Full moon)
* Wolf(Snow biome)
* Wraith

Naturally, all enemies exclusive to a Blood Moon also only spawn at night.

## Achievements

 **You Can Do It!** • *“Survive your character's first full night.”*Survive your first full night. Category:  Explorer
 **Survivor** • *“You have survived the first night!”*Survive your first full night.
 **Bloodbath** • *“Survive a blood moon, a nocturnal event where the rivers run red and monsters swarm aplenty.”*Survive your first Blood Moon. Category:  Explorer
 **Kill the Sun** • *“Survive a solar eclipse, a day darker than night filled with creatures of horror.”*Survive a Solar Eclipse. Category:  Explorer
## Trivia

* On the title screen, the sun or moon can be dragged around.
	+ If a controller is used, this can be done by moving the right analog stick while RT/R2/ZR is held down.
	+ Before formal server software was released for Terraria, and while it was necessary to open a second window of Terraria to host a server, dragging the sun or moon around would directly change the time of day within the server.
	+ When the sun or moon is in the improper place after being dragged, when the world loads the sun will slowly move towards the proper place instead of instantly snapping there. However, if the moon is present on the title screen instead of the sun or vice versa, the sun/moon will instantly snap to its normal location.
	+ Doing this in the PC version, Console version, and Mobile version will cause the title screen music to change from "Journey's End" to the old Title Screen music and changes the logo to the old logo.
* While wearing Sunglasses, the sun appears to be wearing them as well. The sun will also have the old sun texture from before 1.2. Un-equipping the sunglasses will cause it to revert. This has no functional effect.
* Internally, the time counter is increased by 1 each tick, and is reset to zero at both dawn and dusk. During the daytime, the counter is allowed to go up to 54000, and during nighttime, it is only allowed to go up to 32400.
* Despite the sun and moon both always having the same relative position to each other, there are still moon phases (there can be a new moon even though the moon is not visible).

## History

PC version
* Desktop 1.4.4: Day can now be skipped to dusk by using the Enchanted Moondial obtained by throwing the Enchanted Sundial into the Shimmer.

* Desktop 1.4.0.1: Beds can now be slept in to pass time 5 times as quickly. However, this cannot be done during Events or when Bosses are alive. Furthermore, everyone in a multiplayer server must be in a bed to speed up time.

* Desktop 1.3.0.1: Time can now be sped up with the Enchanted Sundial.

* Desktop 1.2:
	+ The sun is now brighter.
	+ Midnight is now darker.

* Desktop-Release: Introduced.

Console version
* Console 1.0.933.1: Time can now be sped up with the Enchanted Sundial. ()

* Console 1.0.750.0: Time can now be sped up with the Enchanted Sundial. ()

* Console-Release: Introduced.

Nintendo Switch version
* Switch 1.0.711.6: Introduced with changes up to Desktop 1.3.0.1.

Mobile version
* Mobile 1.4.0.5.0: Beds can now be slept in to pass time 5 times as quickly. However, this cannot be done during Events or when Bosses are alive. Furthermore, everyone in a multiplayer server must be in a bed to speed up time.

* Mobile 1.3.0.7:
	+ Removed shortened nights in pre-Hardmode.
	+ Time can now be sped up with the Enchanted Sundial.

* Mobile-Release: Introduced with shortened pre-Hardmode nights.

Nintendo 3DSversion
* 3DS-Release: Introduced.

## Footnotes

1. ↑ A tick is a time unit countable by the software. Most of *Terraria*'s updating logic happens every tick. A tick has the length of 1/60th of a second, hence there are 60 ticks in a second and 3600 ticks in a minute.