src/test/SDL_test_log.c
changeset 7405 5a9172b56b18
parent 7191 75360622e65f
child 7678 286c42d7c5ed
equal deleted inserted replaced
7404:dfbe1bfff593 7405:5a9172b56b18
    53 char *SDLTest_TimestampToString(const time_t timestamp)
    53 char *SDLTest_TimestampToString(const time_t timestamp)
    54 {
    54 {
    55     time_t copy;
    55     time_t copy;
    56     static char buffer[64];
    56     static char buffer[64];
    57     struct tm *local;
    57     struct tm *local;
       
    58     const char *fmt = "%x %X";
    58 
    59 
    59     SDL_memset(buffer, 0, sizeof(buffer));\
    60     SDL_memset(buffer, 0, sizeof(buffer));
    60     copy = timestamp;
    61     copy = timestamp;
    61     local = localtime(&copy);
    62     local = localtime(&copy);
    62     strftime(buffer, sizeof(buffer), "%x %X", local);
    63     strftime(buffer, sizeof(buffer), fmt, local);
    63 
    64 
    64     return buffer;
    65     return buffer;
    65 }
    66 }
    66 
    67 
    67 /*
    68 /*