AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
CTIME ( 3C ) CTIME ( 3C ) NAME ctime, localtime, gmtime, asctime, tzset - convert date and time to string SYNOPSIS #include char •ctime {clock) long •clock; struct tm •Iocaltime {clock) long •clock; struct tm •gmtime (clock) long •clock; char •asctime (tm) struct tm •tm; extern long timezone; extern int daylight; extern char •tzname[2]; void tzset ( ) DESCRIPTION Ctime converts a long integer, pointed to by clock, representing the time in seconds since 00:00:00 GMT, January 1, 1970, and returns a pointer to a 26-character string in the following form. All the fields have constant width. Sun Sep 16 01:03:52 1973\n\0 Localtime and gmtime return pointers to "tm" structures, described below. Localtime corrects for the time zone and possible Daylight Savings Time; gmtime converts directly to Greenwich Mean Time (GMT), which is the time the UNIX system uses. Asctime converts a "tm" structure to a 26-character string, as shown in the above example, and returns a pointer to the string. Declarations of all the functions and externals, and the "tm" structure, are in the header file. The structure declaration is: struct tm { int tm_sec; I* seconds (0 - 59) *I int tm_min; I* minutes (0 - 59) *I int tm_hour; I* hours (0 -23) *I int tm_mday; I* day of month (1 - 31) *I int tm_mon; I* month of year (0 - 11) *I int tm_year; I* year - 1900 *I int tm_wday; I* day of week (Sunday = 0) *I int tm_yday; I* day of year (0 - 365) *I int tm_isdst; }; Tm_isdst is non-zero if Daylight Savings Time is in effect. - 1 -
- Page 759 and 760: STIME(2) STIME(2) NAME stime - set
- Page 761 and 762: SYNC ( 2) SYNC (2) NAME sync - upda
- Page 763 and 764: SYSLOCAL ( 2) SYSLOCAL ( 2) NAME Sy
- Page 765: TIME ( 2) TIME(2) NAME time - get t
- Page 768 and 769: .�.· '··.· ·•. J '·· -,
- Page 771 and 772: UMASK( 2 ) UMASK ( 2 ) NAME umask -
- Page 773 and 774: UMOUNT (2) UMOUNT (2) NAME umount -
- Page 775: UNAME ( 2 ) UNAME (2) NAME uname -
- Page 779: USTAT (2) USTAT (2) NAME ustat - ge
- Page 783 and 784: WAIT ( 2 ) WAIT ( 2 ) NAME wait - w
- Page 785 and 786: WRITE(2) WRITE (2) NAME write - wri
- Page 787 and 788: INTR0 ( 3 ) INTR0 ( 3 ) NAME intro
- Page 789: A64L ( 3C ) A64L ( 3C ) NAME a641,
- Page 793: ABS (3C) ABS (3C) NAME abs - return
- Page 797: ATOF ( 3C ) ATOF ( 3C ) NAME atof -
- Page 800 and 801: ·�
- Page 803: CLOCK( 3C ) CLOCK( 3C ) NAME clock
- Page 806 and 807: J ··- � . ..._ __ .·
- Page 809: CTERMID ( 3S ) CTERMID ( 3S ) NAME
- Page 813: CTYPE ( 3C ) CTYPE ( 3C ) NAME isal
- Page 816 and 817: CURSES (3) no raw() overlay(winl,wi
- Page 818 and 819: I�
- Page 820 and 821: DIAL ( 3C ) DIAL ( 3C ) required. T
- Page 822 and 823: DRAND48 ( 3C ) DRAND48 ( 3C ) a = 5
- Page 824 and 825: � --- ·
- Page 827: END ( 3C ) END ( 3C ) NAME end, ete
- Page 830 and 831: � .._.·· ��. .... ._ _ _ /
- Page 832 and 833: · '-... _ _ / . f) · (� "-- ·
- Page 835: FCLOSE ( 3S ) FCLOSE ( 3S ) NAME fc
- Page 839: FLOOR ( 3M ) FLOOR ( 3M) NAME floor
- Page 842 and 843: FOPEN (3S) FOPEN (3S) may be used t
- Page 844 and 845: FORM(3T) (AT&T UNIX PC only ) FORM
- Page 846 and 847: FORM{3T) { }; (AT&T UNIX PC only )
- Page 848 and 849: FORM(3T) (AT&T UNIX PC only ) FORM(
- Page 851: FREXP ( 3C ) FREXP ( 3C ) NAME frex
- Page 855: FTW(3C) FTW(3C) NAME ftw - walk a f
- Page 858 and 859: �·. (
CTIME ( 3C ) CTIME ( 3C )<br />
NAME<br />
ctime, localtime, gmtime, asctime, tzset - convert date and time<br />
to string<br />
SYNOPSIS<br />
#include <br />
char •ctime {clock)<br />
long •clock;<br />
struct tm •Iocaltime {clock)<br />
long •clock;<br />
struct tm •gmtime (clock)<br />
long •clock;<br />
char •asctime (tm)<br />
struct tm •tm;<br />
extern long timezone;<br />
extern int daylight;<br />
extern char •tzname[2];<br />
void tzset ( )<br />
DESCRIPTION<br />
Ctime converts a long integer, pointed to by clock, representing<br />
the time in seconds since 00:00:00 GMT, January 1, 1970, and<br />
returns a pointer to a 26-character string in the following form.<br />
All the fields have constant width.<br />
Sun Sep 16 01:03:52 1973\n\0<br />
Localtime and gmtime return pointers to "tm" structures,<br />
described below. Localtime corrects for the time zone and possible<br />
Daylight Savings Time; gmtime converts directly to<br />
Greenwich Mean Time (GMT), which is the time the UNIX system<br />
uses.<br />
Asctime converts a "tm" structure to a 26-character string, as<br />
shown in the above example, and returns a pointer to the string.<br />
Declarations of all the functions and externals, and the "tm"<br />
structure, are in the header file. The structure<br />
declaration is:<br />
struct tm {<br />
int tm_sec; I* seconds (0 - 59) *I<br />
int tm_min; I* minutes (0 - 59) *I<br />
int tm_hour; I* hours (0 -23) *I<br />
int tm_mday; I* day of month (1 - 31) *I<br />
int tm_mon; I* month of year (0 - 11) *I<br />
int tm_year; I* year - 1900 *I<br />
int tm_wday; I* day of week (Sunday = 0) *I<br />
int tm_yday; I* day of year (0 - 365) *I<br />
int tm_isdst;<br />
};<br />
Tm_isdst is non-zero if Daylight Savings Time is in effect.<br />
- 1 -