xref: /csrg-svn/include/time.h (revision 40486)
130583Sbostic /*
237102Sbostic  * Copyright (c) 1989 The Regents of the University of California.
337102Sbostic  * All rights reserved.
430583Sbostic  *
537102Sbostic  * Redistribution and use in source and binary forms are permitted
637102Sbostic  * provided that the above copyright notice and this paragraph are
737102Sbostic  * duplicated in all such forms and that any documentation,
837102Sbostic  * advertising materials, and other materials related to such
937102Sbostic  * distribution and use acknowledge that the software was developed
1037102Sbostic  * by the University of California, Berkeley.  The name of the
1137102Sbostic  * University may not be used to endorse or promote products derived
1237102Sbostic  * from this software without specific prior written permission.
1337102Sbostic  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1437102Sbostic  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1537102Sbostic  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1637102Sbostic  *
17*40486Smckusick  *	@(#)time.h	5.3 (Berkeley) 03/13/90
1830583Sbostic  */
1918330Smckusick 
20*40486Smckusick #include <sys/types.h>
21*40486Smckusick 
2218330Smckusick struct tm {
2337102Sbostic 	int	tm_sec;		/* seconds after the minute [0-60] */
2437102Sbostic 	int	tm_min;		/* minutes after the hour [0-59] */
2537102Sbostic 	int	tm_hour;	/* hours since midnight [0-23] */
2637102Sbostic 	int	tm_mday;	/* day of the month [1-31] */
2737102Sbostic 	int	tm_mon;		/* months since January [0-11] */
2837102Sbostic 	int	tm_year;	/* years since 1900 */
2937102Sbostic 	int	tm_wday;	/* days since Sunday [0-6] */
3037102Sbostic 	int	tm_yday;	/* days since January 1 [0-365] */
3137102Sbostic 	int	tm_isdst;	/* Daylight Savings Time flag */
3237102Sbostic 	long	tm_gmtoff;	/* offset from CUT in seconds */
3337102Sbostic 	char	*tm_zone;	/* timezone abbreviation */
3418330Smckusick };
3518330Smckusick 
3640323Sbostic #ifdef __STDC__
3740323Sbostic extern struct tm *gmtime(const time_t *);
3840323Sbostic extern struct tm *localtime(const time_t *);
3940323Sbostic extern time_t mktime(const struct tm *);
4040323Sbostic extern time_t time(time_t *);
4140323Sbostic extern double difftime(const time_t, const time_t);
4240323Sbostic extern char *asctime(const struct tm *);
4340323Sbostic extern char *ctime(const time_t *);
4440323Sbostic extern char *timezone(int , int);
4540323Sbostic extern void tzset(void);
4640323Sbostic extern void tzsetwall(void);
4740323Sbostic #else
4840323Sbostic extern struct tm *gmtime();
4940323Sbostic extern struct tm *localtime();
5040323Sbostic extern time_t mktime();
5140323Sbostic extern time_t time();
5240323Sbostic extern double difftime();
5340323Sbostic extern char *asctime();
5440323Sbostic extern char *ctime();
5540323Sbostic extern char *timezone();
5640323Sbostic extern void tzset();
5740323Sbostic extern void tzsetwall();
5840323Sbostic #endif
59