Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

Unix

Unix v6

ctime(3)



ctime, localtime, gmtime convert date and time to ASCII char *ctime(tvec)
int tvec[2];
[from Fortran]
double precision ctime
int *localtime(tvec)
int tvec[2]; int *gmtime(tvec)
int tvec[2];

converts a time in the vector such as returned by time (II) into ASCII and returns a pointer to a character string in the form

Sun Sep 16 01:03:52 1973\n\0 All the fields have constant width. The and entries return pointers to integer vectors containing the broken-down time. corrects for the time zone and possible daylight savings time; converts directly to GMT, which is the time UNIX uses. The value is a pointer to an array whose components are 0

seconds 1

minutes 2

hours 3

day of the month (1-31) 4

month (0-11) 5

year 1900 6

day of the week (Sunday = 0) 7

day of the year (0-365) 8

Daylight Saving Time flag if non-zero The external variable contains the difference, in seconds, between GMT and local standard time (in EST, is 5*60*60); the external variable is non-zero iff the standard U.S.A. Daylight Savings Time conversion should be applied. The program knows about the peculiarities of this conversion in 1974 and 1975; if necessary, a table for these years can be extended. A routine named is also available from Fortran. Actually it more resembles the (II) system entry in that it returns the number of seconds since the epoch 0000 GMT Jan. 1, 1970 (as a floating-point number). time(II)



ctime(3)