clean up comment handling some more, keep shells straight
[unix-history] / usr / src / lib / libc / gen / ctime.3
index 5f9b021..66d14ce 100644 (file)
@@ -2,9 +2,9 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)ctime.3     4.1 (Berkeley) %G%
+.\"    @(#)ctime.3     6.4 (Berkeley) %G%
 .\"
 .\"
-.TH CTIME 3 
+.TH CTIME 3  ""
 .UC 4
 .SH NAME
 ctime, localtime, gmtime, asctime, timezone \-  convert date and time to ASCII
 .UC 4
 .SH NAME
 ctime, localtime, gmtime, asctime, timezone \-  convert date and time to ASCII
@@ -54,26 +54,32 @@ converts a broken-down time to ASCII and returns a pointer
 to a 26-character string.
 .PP
 The structure declaration from the include file is:
 to a 26-character string.
 .PP
 The structure declaration from the include file is:
-.RS
 .PP
 .PP
+.RS
 .nf
 .nf
-.so /usr/include/time.h
+.nr .0 .8i+\w'int tm_isdst'u
+.ta .5i \n(.0u \n(.0u+\w'/* 0-000'u+1n
+struct tm {
+       int tm_sec;     /* 0-59 seconds */
+       int tm_min;     /* 0-59 minutes */
+       int tm_hour;    /* 0-23 hour */
+       int tm_mday;    /* 1-31 day of month */
+       int tm_mon;     /* 0-11 month */
+       int tm_year;    /* 0-   year \- 1900 */
+       int tm_wday;    /* 0-6  day of week (Sunday = 0) */
+       int tm_yday;    /* 0-365        day of year */
+       int tm_isdst;   /* flag:        daylight savings time in effect */
+};
 .fi
 .RE
 .PP
 .fi
 .RE
 .PP
-These quantities give the time on a 24-hour clock,
-day of month (1-31), month of year (0-11), day of week
-(Sunday = 0), year \- 1900, day of year (0-365),
-and a flag that is nonzero if daylight saving time is in effect.
-.PP
 When local time is called for,
 the program consults the system to determine the time zone and
 When local time is called for,
 the program consults the system to determine the time zone and
-whether the standard U.S.A. daylight saving time adjustment is
-appropriate.
-The program knows about the peculiarities
-of this conversion in 1974 and 1975;
-if necessary,
-a table for these years can be extended.
+whether the U.S.A., Australian, Eastern European, Middle European,
+or Western European daylight saving time adjustment is appropriate.
+The program knows about various peculiarities in time conversion
+over the past 10-20 years; if necessary, this understanding can
+be extended.
 .PP
 .I Timezone
 returns the name of the time zone associated with its first argument,
 .PP
 .I Timezone
 returns the name of the time zone associated with its first argument,
@@ -82,7 +88,7 @@ If the second argument is 0, the standard name is used,
 otherwise the Daylight Saving version.
 If the required name does not appear in a table
 built into the routine,
 otherwise the Daylight Saving version.
 If the required name does not appear in a table
 built into the routine,
-the difference from GMT is produced; e.g.
+the difference from GMT is produced; e.g.,
 in Afghanistan
 .I timezone(-(60*4+30), 0)
 is appropriate because it is 4:30 ahead of GMT
 in Afghanistan
 .I timezone(-(60*4+30), 0)
 is appropriate because it is 4:30 ahead of GMT
@@ -90,7 +96,7 @@ and the string
 .B GMT+4:30
 is produced.
 .SH "SEE ALSO"
 .B GMT+4:30
 is produced.
 .SH "SEE ALSO"
-time(2)
+gettimeofday(2), time(3)
 .SH BUGS
 The return values point to static data
 whose content is overwritten by each call.
 .SH BUGS
 The return values point to static data
 whose content is overwritten by each call.