Method ctime()

Method ctime

string ctime(int timestamp)


Convert the output from a previous call to time() into a readable string containing the current year, month, day and time.

Like localtime, this function might throw an error if the ctime(2) call failed on the system. It's platform dependent what time ranges that function can handle, e.g. Windows doesn't handle a negative timestamp.

See also

time(), localtime(), mktime(), gmtime()