date

date — gets the OS date and time; translates seconds into dates.

Syntax

date (seconds?, is_utc?)

		

Arguments

seconds

A number of seconds, such as returned from a call to clock.

is_utc

A value of t puts the date in Coordinated Universal Time (formerly known as Greenwich Mean Time, GMT).

Returns

The date as a character string.

Description

This function returns a character string which represents the current date and time in human-readable form. This form depends on the operating system, but will look like "Sat Mar 21 15:58:27 2000" on most UNIX systems. The seconds parameter returns the date that corresponds to the number of seconds since Jan 1, 1970, Coordinated Universal Time.

Example

Gamma> date();
"Fri Mar 31 09:18:27 2000"
Gamma> date(987654321);
"Thu Apr 19 00:25:21 2001"
Gamma> date(987654321,t);
"Thu Apr 19 04:25:21 2001"
Gamma> date(0,t);
"Thu Jan  1 00:00:00 1970"
Gamma>  
		

See Also

clock