Get the sun position
this.$api.time.get_sun_position()
Returns an object with the sun's position and relevant times of the day.
Get the sim time (UTC)
this.$api.time.get_sim_time_utc()
Returns a Date object with the sim's UTC time.
Get the sim time (Local)
this.$api.time.get_sim_time_local()
Returns a Date object with the sim's local time.
Offset the time of day
this.$api.time.set_sun_offset_utc(offset)
offset
: (Seconds) seconds to offset the time by.
Set the time of day (Local)
this.$api.time.set_local_time(local_time_of_day)
local_time_of_day
: (Seconds) from midnight local.
Set the time of day (Zulu)
this.$api.time.set_zulu_time(zulu_time_of_day)
zulu_time_of_day
: (Seconds) from midnight local.
Set time from a string
this.$api.time.set_time_by_moment(moment)
moment
can be any of the following:
-
live
: Set to realtime -
solarNoon
: The sun-time for the solar noon (sun is in the highest position) -
nadir
: The sun-time for nadir (darkest moment of the night, sun is in the lowest position) -
goldenHourDawnStart
: The sun-time for morning golden hour (soft light, best time for photography) -
goldenHourDawnEnd
: The sun-time for morning golden hour (soft light, best time for photography) -
goldenHourDuskStart
: The sun-time for evening golden hour starts -
goldenHourDuskEnd
: The sun-time for evening golden hour starts -
sunriseStart
: The sun-time for sunrise starts (top edge of the sun appears on the horizon) -
sunriseEnd
: The sun-time for sunrise ends (bottom edge of the sun touches the horizon) -
sunsetStart
: The sun-time for sunset starts (bottom edge of the sun touches the horizon) -
sunsetEnd
: The sun-time for sunset ends (sun disappears below the horizon, evening civil twilight starts) -
blueHourDawnStart
: The sun-time for blue Hour start (time for special photography photos starts) -
blueHourDawnEnd
: The sun-time for blue Hour end (time for special photography photos end) -
blueHourDuskStart
: The sun-time for blue Hour start (time for special photography photos starts) -
blueHourDuskEnd
: The sun-time for blue Hour end (time for special photography photos end) -
civilDawn
: The sun-time for dawn (morning nautical twilight ends, morning civil twilight starts) -
civilDusk
: The sun-time for dusk (evening nautical twilight starts) -
nauticalDawn
: The sun-time for nautical dawn (morning nautical twilight starts) -
nauticalDusk
: The sun-time for nautical dusk end (evening astronomical twilight starts) -
amateurDawn
: The sun-time for amateur astronomical dawn (sun at 12° before sunrise) -
amateurDusk
: The sun-time for amateur astronomical dusk (sun at 12° after sunrise) -
astronomicalDawn
: The sun-time for night ends (morning astronomical twilight starts) -
astronomicalDusk
: The sun-time for night starts (dark enough for astronomical observations)