Time of day

From Minetest
A day in Minetest (uses other world times than in the “Important times of day” section)

Time of day determines the position of the sun, moon and stars in the day-night cycle.

Internal format

The time of day internally uses so-called “millihours” (mh). A millihour is the 1000th part of an hour. 1 millihour equals exactly 3.6 seconds. Note that when we talk about time in this article, we mean the time as simulated in the game, unless mentioned otherwise.

The time of day is a number between 0 and 23999. This range represents a full 24h day. The full hours are multiplied by 1000. So, for example 12:00 would correspond to 12000 millihours.

Setting the world time

The world time can be set with the /time command by players who have the “settime” privilege. It takes the desired time of day as it’s only parameter. Refer the “Important times of day” section as a guide.

You can either use millihours or the standard HH:MM format to set the time, but the HH:MM format is less precise.

Examples

  • /time 6000 - sets the time of day to morning (6:00)
  • /time 12000 - sets the time of day to midday (12:00)
  • /time 7:30 - sets time to 7:30

Important times of day

The following world times were taken from experimentation. The numbers in brackets denote the brightness level compared to moonlight (higher is brighter, this number is only used for this article).

  • At 0 millihours (mh) (0:00) the day begins; it is midnight and the moon is exactly at the zenith (1).
  • At 4500 mh (4:30), the first sun rays emit from the horizon, it gets brighter (2).
  • At 4750 mh (4:45), the sun rises and it gets brighter (3).
  • At 5001 mh (~5:00), it gets brighter again (4).
  • At 5200 mh (5:12), the sun becomes fully visible (4).
  • At 5250 mh (5:15), it gets brighter again (5).
  • At 5500 mh (5:30), it gets brighter again (6).
  • At 5751 mh (~5:45), maximum brightness is reached (7).
  • At 12000 mh (12:00) is midday; the sun is exactly at the zenith (7).
  • At 18250 mh (18:15), the day is going to end, it gets a bit darker (6).
  • At 18502 mh (~18:30), it gets a bit darker again (5).
  • At 18600 mh (18:35), the sun begins to set (5).
  • At 18752 mh (~18:45), it gets a bit darker yet again (4).
  • At 19000 mh (19:00), the sky gets even darker (3).
  • At 19252 mh (~19:15), the sun is almost gone and the sky gets even darker (2).
  • At 19359 mh (~19:22), the sun square is gone and the last sun rays emit from the horizon (2).
  • At 19500 mh (19:30), the sun rays stop from being visible (2).
  • At 19502 mh (~19:30), the sky has the lowest brightness (1).
  • At 23999 mh (~23:59), it's the last millihour before the next day (1).

Storing the time of day

In the world files in env_meta.txt, the time of day is stored as “time_of_day”.

Simulation speed

By default, a game day lasts 20 minutes in real time.

The “speed” of full day/night cycle can be set in the minetest.conf setting time_speed.

See also