mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:12:58 +00:00
Create a branch for network fixes.
svn path=/branches/aicom-network-fixes/; revision=34994
This commit is contained in:
parent
0e213bbc00
commit
c501d8112c
18148 changed files with 0 additions and 860488 deletions
29
lib/sdk/crt/time/strtime.c
Normal file
29
lib/sdk/crt/time/strtime.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* 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: Ariadne
|
||||
* UPDATE HISTORY:
|
||||
* 28/12/98: Created
|
||||
*/
|
||||
#include <precomp.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
char* _strtime(char* buf)
|
||||
{
|
||||
time_t t;
|
||||
struct tm *d;
|
||||
char* dt = (char*)buf;
|
||||
|
||||
if ( buf == NULL ) {
|
||||
__set_errno(EINVAL);
|
||||
return NULL;
|
||||
}
|
||||
t = time(NULL);
|
||||
d = localtime(&t);
|
||||
sprintf(dt,"%d:%d:%d",d->tm_hour,d->tm_min,d->tm_sec);
|
||||
return dt;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue