DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

wcsftime(S-osr5)


wcsftime -- convert data and time to wide character string

Syntax

cc . . . -lc

#include <wchar.h>

size_t wcsftime(wchar_t *wcs, size_t maxsize, const char *format, const struct tm *timptr);

Description

wcsftime(S-osr5) converts and formats the time values contained in the structure pointed to by timptr; it then places output wide-character codes into the array pointed to by wcs. The conversion and formatting are controlled by the character string format. If the output string would be over maxsize wide characters long, the content in the array is undefined.

This routine behaves as if strftime(S-osr5) generates a character string, and then mbstowcs(S-osr5) takes this string as its string input and places its output wide character string to wcs. The interpretation of format for wcsftime( ) is the same as that for strftime(S-osr5).

If copying takes place in overlapping memory blocks, the result is undefined.

Return values

wcsftime( ) returns the number of its output wide-character codes in the array pointed to by wcs. The terminating null wide-character code is not included in the number count. If the output wide character string (including the terminating null) is more than maxsize wide-characters long, zero is returned and the contents of the array are undefined.

See also

strftime(S-osr5), mbstowcs(S-osr5)

Standards conformance

wcsftime is conformant with:
X/Open CAE Specification, System Interfaces and Headers, Issue 4, 1992.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005