systemTime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
mNo edit summary
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command


| arma3 |Game name=
|game1= arma3
|version1= 2.00


| 2.00 |Game version=
|gr1= Time


|gr1= Time |GROUP1=
|descr= Returns system time.


| Returns system time. |DESCRIPTION=
|s1= [[systemTime]]


| [[systemTime]] |SYNTAX=
|r1= [[Array]] of [[Number]]s in format [year, month, day, hour, minute, second, millisecond]


| [[Array]] in format [year, month, day, hour, minute, second, millisecond] |RETURNVALUE=
|x1= <sqf>private _currentTime = systemTime;</sqf>


|x1= <code>_currentTime = [[systemTime]];</code> |Example1=
|x2= <sqf>systemTime apply {if (_x < 10) then {"0" + str _x} else {str _x}}; // ["2021","05","03","14","09","37","593"]</sqf>


| [[systemTimeUTC]], [[date]], [[time]], [[daytime]], [[diag_tickTime]], [[serverTime]], [[missionStart]], [[diag_deltaTime]] |SEEALSO=
|x3= <sqf>systemTime params ["_year", "_month", "_day", "_hour", "_minute", "_second", "_millisecond"];</sqf>
 
|seealso= [[systemTimeUTC]] [[date]] [[time]] [[dayTime]] [[diag_tickTime]] [[serverTime]] [[missionStart]] [[diag_deltaTime]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|Scripting Commands}}
<!-- CONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Latest revision as of 06:40, 7 November 2023

Hover & click on the images for description

Description

Description:
Returns system time.
Groups:
Time

Syntax

Syntax:
systemTime
Return Value:
Array of Numbers 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