Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gamemode/core/libs/sh_date.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ if SERVER then
-- Checks the time difference between the old time values and current time, and updates month and day to advance in the time difference
-- creates a timer that updates the month and day values, in case the server runs continuously without restarts.
function nut.date.initialize()
-- Migrations
if (istable(nut.data.get("date", os.time(), true))) then
nut.data.set("date", os.time(), true, true)
end

local configTime = os.time({
year = tonumber(os.date("%Y")),
month = tonumber(nut.config.get("month")),
Expand Down