Print this page
4378 Clean up %C in *time() functions
438 need documentation for strftime %s flag
@@ -18,10 +18,12 @@
*
* CDDL HEADER END
*/
/*
+ * Copyright (c) 2014 Gary Mills
+ *
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
*/
#include <stdio.h>
#include <stdlib.h>
@@ -71,11 +73,11 @@
/* too big for formatting */
return;
}
(void) memcpy(&timefield, field, sizeof (timefield));
timefield = BE_32(timefield);
- if (strftime(timestring, sizeof (timestring), "%C",
+ if (strftime(timestring, sizeof (timestring), "%c",
localtime(&timefield)) == 0) {
/* buffer too small */
return;
}
(void) nvlist_add_string(nv, path, timestring);