Time Of Day 3.0.1

What it does
Sets how long day and night last in real minutes and lets players vote to skip the night. By default
day lasts 45 minutes and night 6. It works through Rust's own sky clock and puts the clock's
original settings back when it unloads.

At night any player can start a skip vote with /skipnight (or /voteday). Other players vote with the
same command. The night is skipped when 51% of online players have voted, within 60 seconds; after a
vote there is a 5 minute cooldown.

Other options: skip every night or every day automatically, keep the date from advancing, set a
fixed date, or freeze the clock at a chosen hour when the plugin loads. When the clock is running it
switches the server's time progress on, even if it was turned off before.

Install
Drop plugins/TimeOfDay.cs into carbon/plugins (Carbon) or oxide/plugins (Oxide).

Commands
/tod - shows the time, sunrise, sunset, day and night lengths. Anyone.
/skipnight - start or join a skip-night vote (name set by chatCommand). Anyone.
/skipnight status - shows the vote count and time left. Anyone.
/skipnight force - skip the night now. Staff.
/voteday - same as /skipnight (name set by chatAlias).
tod.daylength [minutes] - shows or sets the day length and saves it. Staff.
tod.nightlength [minutes] - shows or sets the night length and saves it. Staff.
tod.skipday - jump to sunset. Staff.
tod.skipnight - jump to sunrise. Staff.
tod.freezetime - stop or restart the clock (not saved). Staff with auth level 2 or higher.
Staff means the server console or RCON, a player with auth level 1 or higher (authLevelCmds), or a
    player with the mixpack.admin permission.

Permissions
mixpack.admin - counts as staff for every command above.

Config highlights
Config file: carbon/configs/TimeOfDay.json
Settings.dayLength = 45, Settings.nightLength = 6 - real minutes of day and of night.
Settings.autoSkipNight = false, Settings.autoSkipDay = false - skip every night or every day.
Settings.freezeDate = false - keep the in-game date from advancing.
Settings.authLevelCmds = 1, Settings.authLevelFreeze = 2 - auth level needed for the staff commands
    and for tod.freezetime.
SkipNightVote.enabled = true, requiredPercent = 0.51, durationSeconds = 60, cooldownSeconds = 300,
    minPlayers = 1.
SkipNightVote.chatCommand = "skipnight", chatAlias = "voteday" - vote command names.
TimeFreeze.freezeTimeOnload = false, timeToFreeze = 12.0 - freeze the clock at this hour on load.
DatePreset.setPresetDate = false, presetDay = 1, presetMonth = 1, presetYear = 2020.

Tested
Tested alone on Carbon 2.0.259.0 with Rust build 25454815 on 2026-09-28; runs without the rest of the MiX Server Pack.

Feedback
Questions, bugs and ideas: MixMods Discord, discord.gg/MZCdmvFrQ, message B1.

Licence
Free to run and change on your own servers. See LICENCE.txt.
