Difference between revisions of "Time of day"

From Minetest Wiki
Jump to navigation Jump to search
(Print wall times)
Line 1: Line 1:
 
{{Languages}}
 
{{Languages}}
 
[[File:A day in Minetest 0.4.7.png|thumb|150px|A day in Minetest (uses other world times than in the “Important times of day” section)|right]]
 
[[File:A day in Minetest 0.4.7.png|thumb|150px|A day in Minetest (uses other world times than in the “Important times of day” section)|right]]
'''Time of day''' determines the position of the sun, moon and stars in the day-night cycle. It is represented as a number which is between 0 and 24000 (24000 excluded), this range represents a full day. This number resembles the 24-hour system, where the full hours are multiplied by 1000. So, for example 12:00 would correspond to 12000 time of day (think of it only as a guide to get an idea how it works).
+
'''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.
 +
 
 +
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 ==
 
== Setting the world time ==
 
The world time can be set with the <code>/time</code> [[Server commands|command]] by players who have the “settime” [[Privileges|privilege]]. It takes the desired time of day as it’s only parameter. Refer the “Important times of day” section as a guide.
 
The world time can be set with the <code>/time</code> [[Server commands|command]] by players who have the “settime” [[Privileges|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 ===
 
=== Examples ===
*<code>/time 6000</code> - sets the time of day to morning (corresponds to 6:00)
+
*<code>/time 6000</code> - sets the time of day to morning (6:00)
*<code>/time 12000</code> - sets the time of day to midday (corresponds to 12:00)
+
*<code>/time 12000</code> - sets the time of day to midday (12:00)
 +
*<code>/time 7:30</code> - sets time to 7:30
  
 
== Important times of day ==
 
== 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).
 
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 time of day (tod) the day begins; it is midnight and the moon is exactly at the zenith (1).'''
+
* '''At   0 millihours (mh) (0:00) the day begins; it is midnight and the moon is exactly at the zenith (1).'''
* At  4500 tod, the first sun rays emit from the horizon, it gets brighter '''(2)'''.
+
* At  4500 mh (4:30), the first sun rays emit from the horizon, it gets brighter '''(2)'''.
* At  4750 tod, the sun rises and it gets brighter '''(3)'''.
+
* At  4750 mh (4:45), the sun rises and it gets brighter '''(3)'''.
* At  5001 tod, it gets brighter again '''(4)'''.
+
* At  5001 mh (~5:00), it gets brighter again '''(4)'''.
* At  5200 tod, the sun becomes fully visible '''(4)'''.
+
* At  5200 mh (5:12), the sun becomes fully visible '''(4)'''.
* At  5250 tod, it gets brighter again '''(5)'''.
+
* At  5250 mh (5:15), it gets brighter again '''(5)'''.
* At  5500 tod, it gets brighter again '''(6)'''.
+
* At  5500 mh (5:30), it gets brighter again '''(6)'''.
* At  5751 tod, maximum brightness is reached '''(7)'''.
+
* At  5751 mh (~5:45), maximum brightness is reached '''(7)'''.
* '''At 12000 tod is midday; the sun is exactly at the zenith (7).'''
+
* '''At 12000 mh (12:00) is midday; the sun is exactly at the zenith (7).'''
* At 18250 tod, the day is going to end, it gets a bit darker '''(6)'''.
+
* At 18250 mh (18:15), the day is going to end, it gets a bit darker '''(6)'''.
* At 18502 tod, it gets a bit darker again '''(5)'''.
+
* At 18502 mh (~18:30), it gets a bit darker again '''(5)'''.
* At 18600 tod, the sun begins to set '''(5)'''.
+
* At 18600 mh (18:35), the sun begins to set '''(5)'''.
* At 18752 tod, it gets a bit darker yet again '''(4)'''.
+
* At 18752 mh (~18:45), it gets a bit darker yet again '''(4)'''.
* At 19000 tod, the sky gets even darker '''(3)'''.
+
* At 19000 mh (19:00), the sky gets even darker '''(3)'''.
* At 19252 tod, the sun is almost gone and the sky gets even darker '''(2)'''.
+
* At 19252 mh (~19:15), the sun is almost gone and the sky gets even darker '''(2)'''.
* At 19359 tod, the sun square is gone and the last sun rays emit from the horizon '''(2)'''.
+
* At 19359 mh (~19:22), the sun square is gone and the last sun rays emit from the horizon '''(2)'''.
* At 19500 tod, the sun rays stop from being visible '''(2)'''.
+
* At 19500 mh (19:30), the sun rays stop from being visible '''(2)'''.
* At 19502 tod, the sky has the lowest brightness '''(1)'''.
+
* At 19502 mh (~19:30), the sky has the lowest brightness '''(1)'''.
* At 24000 tod, the day ends and the next one starts; it is midnight again '''(1)'''.
+
* At 23999 mh (~23:59), it's the last millihour before the next day '''(1)'''.
  
 
== Storing the time of day ==
 
== Storing the time of day ==

Revision as of 21:45, 10 February 2019

Languages Language: English • Deutsch • français
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.

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”.

See also