#include <stdio.h>
#include <time.h>

char *get_time1()
{
    time_t   current;
    time(&current);
    tm *local = localtime(&current);
    return(asctime(local));
}

char *get_time2()
{
    time_t   current;
    time(&current);
    return(ctime(&current));
}

int main()
{
    printf("%s%s", get_time1(), get_time2());

    getchar();
    return(0);
}
1
Contributor
0
Replies
3
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.