Difference between revisions of "Os.time"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate>Returns the current time when called without arguments, or a time representing the date and time specified by the given table. This table must have fields year, month, and day, and may have fields hour, min, sec, and isdst (for a description of these fields, see the os.date function).  
 
<translate>Returns the current time when called without arguments, or a time representing the date and time specified by the given table. This table must have fields year, month, and day, and may have fields hour, min, sec, and isdst (for a description of these fields, see the os.date function).  
  
Line 9: Line 9:
 
(number) = os.time(table)
 
(number) = os.time(table)
 
</source>
 
</source>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
 
'''table''': (table) <translate>table representing a date time</translate> '''optional'''<br/>
 
'''table''': (table) <translate>table representing a date time</translate> '''optional'''<br/>
=== Return values ===
+
=== <translate>Return values</translate> ===
'''Returns''' (number) <translate>time in seconds</translate><br/>
+
'''<translate>Returns</translate>''' (number) <translate>time in seconds</translate><br/>

Revision as of 07:27, 24 August 2018

Available since: Gideros 2011.6

Description

Returns the current time when called without arguments, or a time representing the date and time specified by the given table. This table must have fields year, month, and day, and may have fields hour, min, sec, and isdst (for a description of these fields, see the os.date function).


The returned value is a number, whose meaning depends on your system. In POSIX, Windows, and some other systems, this number counts the number of seconds since some given start time (the "epoch"). In other systems, the meaning is not specified, and the number returned by time can be used only as an argument to date and difftime.
(number) = os.time(table)

Parameters

table: (table) table representing a date time optional

Return values

Returns (number) time in seconds