Time::getPosixTime: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
Line 1: Line 1:
Gets system time as year, month, day, hour, minute and second.<br><br>Example usage:<br><br> int year;<br> int month;<br> int day;<br> int hour;<br> int minute;<br> int second;<br><br> TIME::GET_POSIX_TIME(&amp;year, &amp;month, &amp;day, &amp;hour, &amp;minute, &amp;second);<br>
Gets system time as year, month, day, hour, minute and second.<br><br>Example usage:<br><br> int year;<br> int month;<br> int day;<br> int hour;<br> int minute;<br> int second;<br><br> TIME::GET_POSIX_TIME(&amp;year, &amp;month, &amp;day, &amp;hour, &amp;minute, &amp;second);<br>
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">time.getPosixTime(year, month, day, hour, minute, second);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.time.getPosixTime(year, month, day, hour, minute, second);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''year:''' int
*'''year:''' int
Line 13: Line 13:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Time_function_c}}
{{Time_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 21:33, 6 May 2017

Gets system time as year, month, day, hour, minute and second.

Example usage:

int year;
int month;
int day;
int hour;
int minute;
int second;

TIME::GET_POSIX_TIME(&year, &month, &day, &hour, &minute, &second);

Syntax

mp.game.time.getPosixTime(year, month, day, hour, minute, second);

Required Arguments

  • year: int
  • month: int
  • day: int
  • hour: int
  • minute: int
  • second: int

Return value

  • object: year, month, day, hour, minute, second

Example

// todo

See also

Template:Time s function c