Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ctime(3F) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

itime(3F)

idate(3F)

fdate(3F)

ctime(3C)

ctime(3V)

TIME(3F)  —  FORTRAN LIBRARY ROUTINES

NAME

time, ctime, ltime, gmtime − return system time

SYNOPSIS/USAGE

character∗24 ctime, string
integer n
string = ctime( n )
integer∗4 stime, tarray(9)
call ltime (stime, tarray)
integer∗4 stime, tarray(9)
call gmtime (stime, tarray)

DESCRIPTION

ctime returns system time, stime, as a 24-character string.
ltime and gmtime separate system time: month, day, ... 
   either for the local time zone or as GMT. tarray 1 through 9, Index, Units, Range:

1 Seconds (0 - 61)
2 Minutes (0 - 59)
3 Hours (0 - 23)
4 Day of month (1 - 31)
5 Months since January (0 - 11)
6 Year - 1900
7 Day of week (Sunday = 0)
8 Day of year (0 - 365)
9 Daylight Standard Time, 1 if DST in effect
For Solaris 1.x, the range for seconds is (0 - 59)

NOTES

For time, with −lV77 you get the VMS version, otherwise you get the standard version.  If you use −lV77, then invoking idate() or time() gets the VMS version. 
Standard Version

Function: time() returns an integer that contains the time since 00:00:00 GMT, Jan. 1, 1970, measured in seconds.  This is the value of the operating system clock. 
Usage:

integer  n, time
n = time()

VMS Version

Subroutine: time gets the current system time as a character string. 
Usage:

call time( t )
where t is of type character∗8, with form hh:mm:ss. 
hh, mm, and ss are 2-digits, and hh is hour, mm is minute, and ss is second. 

Example:

demo% cat tim1.f
        character  t∗8
        call time( t )
        write( ∗, "(’ The time is: ’, A8 )" )  t
        end
demo% f77 −silent  tim1.f  −lV77
demo% a.out
 The time is: 08:14:13
demo%

FILES

libF77.a, libV77.a

SEE ALSO

FORTRAN Reference Manual.
itime(3F), idate(3F), fdate(3F)
ctime(3C)
, in Solaris 2.x
ctime(3V), in Solaris 1.x
   For this C version of ctime, use: man -M /usr/man ctime

Sun Release 4.1  —  Last change: 10 June 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026