Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 739 Bytes

gmtime.adoc

File metadata and controls

35 lines (28 loc) · 739 Bytes

gmtime()

Important

Deprecated in 5.0.

Please use [class-datetime] class.

gmtime(time) => TIME

Converts time in UNIX format (number of seconds since epoch) to calendar date and time broken down into its components, expressed as UTC (or GMT timezone). Function uses either time given in time argument or current time if time is omitted.

Table 1. Parameters

time

Integer

Time as seconds since epoch (1 January 1970 00:00:00 UTC). If omitted, current time is used.

Return

Object of class [class-datetime].

Example
println(gmtime(time()).year);	// 2020
println(gmtime().year);		// 2020