Time
Time represents a ingame time of day.
Constructors
Creates a Time object with given hours, minutes and seconds.
local myTime = Time(12, 30)
Built-in instances
Current ingame day time.
Shortcut to TimeCycle.CurrentTime.
-- sets time to noon for everyone Time.Current = Time.Noon -- same as: CurrentTime.CurrentTime = Time.Noon
Functions
Returns elapsed seconds since January 1, 1970 UTC.
Client.Action2 = function() print("time:", Time.Unix(), "s") end
Returns elapsed milliseconds since January 1, 1970 UTC.
Client.Action2 = function() print("time:", Time.UnixMilli(), "ms") end
Properties
Hour represents the hour within Time, in the range [0,23].
local t = Time.Noon print(t.Hours) -- prints "12"
Minute represents the minute offset within the hour of Time, in the range [0,59].
local t = Time(12, 30, 45) print(t.Minute) -- prints "30"
Second represents the second within the minute of Time, in the range [0,59].
local t = Time(12, 30, 45) print(t.Second) -- prints "45"