X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fmsvcrt%2Ftime%2Fwstrtime.c;fp=lib%2Fmsvcrt%2Ftime%2Fwstrtime.c;h=8af7e567b3f948942997996f708b5f273af7fd76;hb=e3ed2d773259cc445c7ff8181ebd934931365328;hp=0000000000000000000000000000000000000000;hpb=d378c68f5a9bb25c9e671dacd482d2e25d211df3;p=reactos.git diff --git a/lib/msvcrt/time/wstrtime.c b/lib/msvcrt/time/wstrtime.c new file mode 100644 index 0000000..8af7e56 --- /dev/null +++ b/lib/msvcrt/time/wstrtime.c @@ -0,0 +1,30 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/time/strtime.c + * PURPOSE: Fills a buffer with a formatted time representation + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +#include +#include +#include +#include + + +wchar_t* _wstrtime(wchar_t* buf) +{ + time_t t; + struct tm* d; + wchar_t* dt = (wchar_t*)buf; + + if ( buf == NULL ) { + __set_errno(EINVAL); + return NULL; + } + t = time(NULL); + d = localtime(&t); + swprintf(dt,L"%d:%d:%d",d->tm_hour,d->tm_min,d->tm_sec); + return dt; +}