xref: /original-bsd/include/time.h (revision 208c3823)
1 /*
2  * Copyright (c) 1989 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  *	@(#)time.h	5.3 (Berkeley) 03/13/90
18  */
19 
20 #include <sys/types.h>
21 
22 struct tm {
23 	int	tm_sec;		/* seconds after the minute [0-60] */
24 	int	tm_min;		/* minutes after the hour [0-59] */
25 	int	tm_hour;	/* hours since midnight [0-23] */
26 	int	tm_mday;	/* day of the month [1-31] */
27 	int	tm_mon;		/* months since January [0-11] */
28 	int	tm_year;	/* years since 1900 */
29 	int	tm_wday;	/* days since Sunday [0-6] */
30 	int	tm_yday;	/* days since January 1 [0-365] */
31 	int	tm_isdst;	/* Daylight Savings Time flag */
32 	long	tm_gmtoff;	/* offset from CUT in seconds */
33 	char	*tm_zone;	/* timezone abbreviation */
34 };
35 
36 #ifdef __STDC__
37 extern struct tm *gmtime(const time_t *);
38 extern struct tm *localtime(const time_t *);
39 extern time_t mktime(const struct tm *);
40 extern time_t time(time_t *);
41 extern double difftime(const time_t, const time_t);
42 extern char *asctime(const struct tm *);
43 extern char *ctime(const time_t *);
44 extern char *timezone(int , int);
45 extern void tzset(void);
46 extern void tzsetwall(void);
47 #else
48 extern struct tm *gmtime();
49 extern struct tm *localtime();
50 extern time_t mktime();
51 extern time_t time();
52 extern double difftime();
53 extern char *asctime();
54 extern char *ctime();
55 extern char *timezone();
56 extern void tzset();
57 extern void tzsetwall();
58 #endif
59