Print this page
4378 Clean up %C in *time() functions
438 need documentation for strftime %s flag

*** 1,6 **** --- 1,7 ---- '\" te + .\" Copyright (c) 2014 Gary Mills .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 1989 AT&T .\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at .\" http://www.opengroup.org/bookstore/.
*** 7,17 **** .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. .\" This notice shall appear on any product containing this material. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] ! .TH STRFTIME 3C "Sep 5, 2006" .SH NAME strftime, cftime, ascftime \- convert date and time to string .SH SYNOPSIS .LP .nf --- 8,18 ---- .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. .\" This notice shall appear on any product containing this material. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] ! .TH STRFTIME 3C "Jan 3, 2014" .SH NAME strftime, cftime, ascftime \- convert date and time to string .SH SYNOPSIS .LP .nf
*** 48,58 **** \fImaxsize\fR bytes are placed into the array. .sp .LP If \fIformat\fR is \fB(char *)0\fR, then the locale's default format is used. For \fBstrftime()\fR the default format is the same as \fB%c\fR; for ! \fBcftime()\fR and \fBascftime()\fR the default format is the same as \fB%C\fR. \fBcftime()\fR and \fBascftime()\fR first try to use the value of the environment variable \fBCFTIME\fR, and if that is undefined or empty, the default format is used. .sp .LP --- 49,59 ---- \fImaxsize\fR bytes are placed into the array. .sp .LP If \fIformat\fR is \fB(char *)0\fR, then the locale's default format is used. For \fBstrftime()\fR the default format is the same as \fB%c\fR; for ! \fBcftime()\fR and \fBascftime()\fR the default format is the same as \fB%+\fR. \fBcftime()\fR and \fBascftime()\fR first try to use the value of the environment variable \fBCFTIME\fR, and if that is undefined or empty, the default format is used. .sp .LP
*** 105,178 **** .ad .RS 6n Locale's full month name. .RE - .SS "Default" .sp .ne 2 .na \fB\fB%c\fR\fR .ad .RS 6n ! Locale's appropriate date and time represented as: .sp .in +2 .nf - %a %b %d %H:%M:%S %Y - .fi - .in -2 - - This is the default behavior as well as standard-conforming behavior for - standards first supported by releases prior to Solaris 2.4. See - \fBstandards\fR(5). - .RE - - .SS "Standard conforming" - .sp - .ne 2 - .na - \fB\fB%c\fR\fR - .ad - .RS 6n - Locale's appropriate date and time represented as: - .sp - .in +2 - .nf %a %b %e %H:%M:%S %Y .fi .in -2 - - This is standard-conforming behavior for standards first supported by Solaris - 2.4 through Solaris 10. - .RE - - .SS "Default" .sp ! .ne 2 ! .na ! \fB\fB%C\fR\fR ! .ad ! .RS 6n ! Locale's date and time representation as produced by \fBdate\fR(1). ! .sp ! This is the default behavior as well as standard-conforming behavior for ! standards first supported by releases prior to Solaris 2.4. .RE - .SS "Standard conforming" .sp .ne 2 .na \fB\fB%C\fR\fR .ad .RS 6n Century number (the year divided by 100 and truncated to an integer as a decimal number [01,99]). - .sp - This is standard-conforming behavior for standards first supported by Solaris - 2.4 through Solaris 10. .RE .sp .ne 2 .na --- 106,141 ---- .ad .RS 6n Locale's full month name. .RE .sp .ne 2 .na \fB\fB%c\fR\fR .ad .RS 6n ! Locale's appropriate date and time representation. ! In the C locale, this format is: .sp .in +2 .nf %a %b %e %H:%M:%S %Y .fi .in -2 .sp ! Other locales may have different locale-specific formats. .RE .sp .ne 2 .na \fB\fB%C\fR\fR .ad .RS 6n Century number (the year divided by 100 and truncated to an integer as a decimal number [01,99]). .RE .sp .ne 2 .na
*** 337,346 **** --- 300,318 ---- .RE .sp .ne 2 .na + \fB\fB%s\fR\fR + .ad + .RS 6n + Seconds since 00:00:00 UTC, January 1, 1970. + .RE + + .sp + .ne 2 + .na \fB\fB%S\fR\fR .ad .RS 6n Seconds [00,60]; the range of values is [00,60] rather than [00,59] to allow for the occasional leap second.
*** 385,394 **** --- 357,375 ---- .RE .sp .ne 2 .na + \fB\fB%v\fR\fR + .ad + .RS 6n + Date as \fB%e\fR-\fB%b\fR-\fB%Y\fR. + .RE + + .sp + .ne 2 + .na \fB\fB%V\fR\fR .ad .RS 6n The ISO 8601 week number as a decimal number [01,53]. In the ISO 8601 week-based system, weeks begin on a Monday and week 1 of the year is the week
*** 474,483 **** --- 455,473 ---- .RS 6n Time zone name or abbreviation, or no bytes if no time zone information exists. .RE .sp + .ne 2 + .na + \fB\fB%+\fR\fR + .ad + .RS 6n + Locale's date and time representation as produced by \fBdate\fR(1). + .RE + + .sp .LP If a conversion specification does not correspond to any of the above or to any of the modified conversion specifications listed below, the behavior is undefined and \fB0\fR is returned. .sp
*** 786,790 **** --- 776,786 ---- .sp .LP If using the \fB%Z\fR specifier and \fBzoneinfo\fR timezones and if the input date is outside the range 20:45:52 UTC, December 13, 1901 to 03:14:07 UTC, January 19, 2038, the timezone name may not be correct. + .sp + .LP + The conversion specification for \fB%+\fR was added in illumos. + It is not part of any standard, although it is available on a number + of other platforms. + Its use is discouraged for conforming applications.