date and time created 90/05/15 19:17:03 by bostic
[unix-history] / usr / src / include / time.h
CommitLineData
7320c7cd 1/*
976fe643
KB
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
7320c7cd 4 *
976fe643
KB
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 *
c403696a 17 * @(#)time.h 5.3 (Berkeley) %G%
7320c7cd 18 */
86d83cf3 19
c403696a
KM
20#include <sys/types.h>
21
86d83cf3 22struct tm {
976fe643
KB
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 */
86d83cf3
KM
34};
35
e7ce7d7c
KB
36#ifdef __STDC__
37extern struct tm *gmtime(const time_t *);
38extern struct tm *localtime(const time_t *);
39extern time_t mktime(const struct tm *);
40extern time_t time(time_t *);
41extern double difftime(const time_t, const time_t);
42extern char *asctime(const struct tm *);
43extern char *ctime(const time_t *);
44extern char *timezone(int , int);
45extern void tzset(void);
46extern void tzsetwall(void);
47#else
48extern struct tm *gmtime();
49extern struct tm *localtime();
50extern time_t mktime();
51extern time_t time();
52extern double difftime();
53extern char *asctime();
54extern char *ctime();
55extern char *timezone();
56extern void tzset();
57extern void tzsetwall();
58#endif