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

*** 18,36 **** * * CDDL HEADER END */ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - #pragma ident "%Z%%M% %I% %E% SMI" - /* * This routine converts time as follows. The epoch is 0000 Jan 1 * 1970 GMT. The argument time is in seconds since then. The * localtime(t) entry returns a pointer to an array containing: * --- 18,36 ---- * * CDDL HEADER END */ /* + * Copyright (c) 2014 Gary Mills + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ /* * This routine converts time as follows. The epoch is 0000 Jan 1 * 1970 GMT. The argument time is in seconds since then. The * localtime(t) entry returns a pointer to an array containing: *
*** 89,97 **** ascftime(char *buf, const char *format, const struct tm *tm) { /* Set format string, if not already set */ if (format == NULL || *format == '\0') if (((format = getenv("CFTIME")) == 0) || *format == 0) ! format = "%C"; return ((int)strftime(buf, LONG_MAX, format, tm)); } --- 89,97 ---- ascftime(char *buf, const char *format, const struct tm *tm) { /* Set format string, if not already set */ if (format == NULL || *format == '\0') if (((format = getenv("CFTIME")) == 0) || *format == 0) ! format = "%+"; return ((int)strftime(buf, LONG_MAX, format, tm)); }