Difference between revisions of "systemTime"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Some wiki formatting)
 
(3 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
|r1= [[Array]] in format [year, month, day, hour, minute, second, millisecond]
 
|r1= [[Array]] in format [year, month, day, hour, minute, second, millisecond]
  
|x1= <code>_currentTime = [[systemTime]];</code>
+
|x1= <sqf>private _currentTime = systemTime;</sqf>
  
|x2= <code>[[systemTime]] [[apply]] {[[if]] (_x [[a less b|<]] 10) [[then]] {"0" [[+]] [[str]] _x} [[else]] {[[str]] _x}<nowiki>}</nowiki>; {{cc|["2021","05","03","14","09","37","593"]}}</code>
+
|x2= <sqf>systemTime apply {if (_x < 10) then {"0" + str _x} else {str _x}}; // ["2021","05","03","14","09","37","593"]</sqf>
  
|seealso= [[systemTimeUTC]] [[date]] [[time]] [[dayTime]] [[diag_tickTime]], [[serverTime]], [[missionStart]], [[diag_deltaTime]]
+
|x3= <sqf>systemTime params ["_year", "_month", "_day", "_hour", "_minute", "_second", "_millisecond"];</sqf>
 +
 
 +
|seealso= [[systemTimeUTC]] [[date]] [[time]] [[dayTime]] [[diag_tickTime]] [[serverTime]] [[missionStart]] [[diag_deltaTime]]
 
}}
 
}}

Latest revision as of 13:11, 4 May 2022

Hover & click on the images for description

Description

Description:
Returns system time.
Groups:
Time

Syntax

Syntax:
systemTime
Return Value:
Array in format [year, month, day, hour, minute, second, millisecond]

Examples

Example 1:
private _currentTime = systemTime;
Example 2:
systemTime apply {if (_x < 10) then {"0" + str _x} else {str _x}}; // ["2021","05","03","14","09","37","593"]
Example 3:
systemTime params ["_year", "_month", "_day", "_hour", "_minute", "_second", "_millisecond"];

Additional Information

See also:
systemTimeUTC date time dayTime diag_tickTime serverTime missionStart diag_deltaTime

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note