/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* This is an example of the function wcsftime(wchar_t*,size_t,const wchar_t*,     
    const struct tm*).  This function formats a time string.
*/
#include <wchar.h>
#include <stdlib.h>
#include <time.h>

int main() { 
    size_t retval, maxsize;
    wchar_t str1[100];
    wchar_t format[100];
    char *line;
    struct tm *timeptr;
    int len;
    time_t aclock;
    time(&aclock);
    maxsize = 100;

    line = "%c";
    len = strlen(line);
    mbstowcs(format, line, len);
    timeptr = localtime(&aclock);
    retval = wcsftime(str1, maxsize, format,timeptr );
    fputws(str1, stdout);
    fputs("\n", stdout);
}

