standard.C.time.ctime

ctime is available since version 1.0.

Prototype:

string ctime(number timer)

Parameters

timer
[in] time

Description:

A string result. An empty string will be returned if:

time represents a date before midnight, January 1, 1970, UTC.
time represents a date after 19:14:07 January 18, 2038.

The timer value is usually obtained from a call to time, which returns the number of seconds elapsed since midnight (00:00:00), January 1, 1970, coordinated universal time (UTC). The return value string contains exactly 26 characters and has the form:

Wed Jan 02 02:03:55 1980\n\0

A 24-hour clock is used. All fields have a constant width. The newline character ('\n') and the null character ('\0') occupy the last two positions of the string.

The converted character string is also adjusted according to the local time zone settings.

Return value:

A string result. An empty string will be returned if: time represents a date before midnight, January 1, 1970, UTC. time represents a date after 19:14:07 January 18, 2038

Example
import standard.C.time

class Main {
     function Main() {
          echo "Local time and date are : " + ctime(time());
     }
}
 

Results 
Local time and date are : Sat Mar 11 02:12:37 2006