1WCSFTIME(3P) POSIX Programmer's Manual WCSFTIME(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 wcsftime — convert date and time to a wide-character string
13
15 #include <wchar.h>
16
17 size_t wcsftime(wchar_t *restrict wcs, size_t maxsize,
18 const wchar_t *restrict format, const struct tm *restrict timeptr);
19
21 The functionality described on this reference page is aligned with the
22 ISO C standard. Any conflict between the requirements described here
23 and the ISO C standard is unintentional. This volume of POSIX.1‐2017
24 defers to the ISO C standard.
25
26 The wcsftime() function shall be equivalent to the strftime() function,
27 except that:
28
29 * The argument wcs points to the initial element of an array of wide
30 characters into which the generated output is to be placed.
31
32 * The argument maxsize indicates the maximum number of wide charac‐
33 ters to be placed in the output array.
34
35 * The argument format is a wide-character string and the conversion
36 specifications are replaced by corresponding sequences of wide
37 characters. It is unspecified whether an encoding error occurs if
38 the format string contains wchar_t values that do not correspond to
39 members of the character set of the current locale.
40
41 * Field widths specify the number of wide characters instead of the
42 number of bytes.
43
44 * The return value indicates the number of wide characters placed in
45 the output array.
46
47 If copying takes place between objects that overlap, the behavior is
48 undefined.
49
51 If the total number of resulting wide-character codes including the
52 terminating null wide-character code is no more than maxsize, wcsf‐
53 time() shall return the number of wide-character codes placed into the
54 array pointed to by wcs, not including the terminating null wide-char‐
55 acter code. Otherwise, zero is returned and the contents of the array
56 are unspecified.
57
59 No errors are defined.
60
61 The following sections are informative.
62
64 None.
65
67 None.
68
70 None.
71
73 None.
74
76 strftime()
77
78 The Base Definitions volume of POSIX.1‐2017, <wchar.h>
79
81 Portions of this text are reprinted and reproduced in electronic form
82 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
83 table Operating System Interface (POSIX), The Open Group Base Specifi‐
84 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
85 Electrical and Electronics Engineers, Inc and The Open Group. In the
86 event of any discrepancy between this version and the original IEEE and
87 The Open Group Standard, the original IEEE and The Open Group Standard
88 is the referee document. The original Standard can be obtained online
89 at http://www.opengroup.org/unix/online.html .
90
91 Any typographical or formatting errors that appear in this page are
92 most likely to have been introduced during the conversion of the source
93 files to man page format. To report such errors, see https://www.ker‐
94 nel.org/doc/man-pages/reporting_bugs.html .
95
96
97
98IEEE/The Open Group 2017 WCSFTIME(3P)