Jump to content

GetTimeOfDaySeconds

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (GetTimeOfDaySeconds – created via PowerShell script (2025-11-11T21:12:47Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetTimeOfDaySeconds
Function Description: Returns the number of seconds since midnight of the current day in the mission, calculated from absolute time using modulo arithmetic to ensure it falls within a 24-hour cycle.
File Location: cmm.timeFunctions.lua
Syntax: CMM.GetTimeOfDaySeconds( number or nil TimeNum )
Return Value: number
Parameters: Name Description
TimeNumThe number of seconds to convert into seconds since midnight; if nil or not a number, uses current absolute game time.
Example: GetTimeOfDaySeconds(90061)
Example Description: Returns "1:01:01" as 90061 seconds equals 1 hour, 1 minute, and 1 second since midnight, with the function returning the underlying seconds value.
Related Functions:
Notes: