_ctime Function

Purpose

Converts a _time value to a string and adjust for local time zone settings.

Syntax

int = _ctime [(V: x%)]

Description

The _ctime function converts a time value stored as a _time 32-bit integer into a character string. 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 string result produced by ctime contains exactly 26 characters and has the form:

"Wed Jan 02 02:03:55 1980"#10

A 24-hour clock is used. All fields have a constant width. The new line character ('\n' or #10) occupies the last two positions of the string.

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

Examples

OpenW 1

Local a%, b%, x%

b% = _time(V:a%) // or: ~_time(V:a%)

Print _ctime(V:a%)

KeyGet x%

CloseW 1

And

OpenW 1

Local a%, x%

a% = 200000000  // 200 million

Print _ctime(V:a%)

KeyGet x%

CloseW 1

Remarks

_ctime and _time are implemented for compatibility reasons with C. These functions are restricted to dates between 1970 and 2038.

See Also

_time. Now$

{Created by Sjouke Hamstra; Last updated: 20/09/2014 by James Gaite}