#include <stdio.h>
#include <string.h>
#include <time.h>
int main( void )
{
struct tm *newtime;
char am_pm[] = "AM";
time_t long_time;
time( &long_time );
newtime = localtime( &long_time );
printf( "%d-%d-%d %d:%d:%d/n", newtime->tm_year+1900,newtime->tm_mon+1,newtime->tm_mday,newtime->tm_hour,newtime->tm_min,newtime->tm_sec);
getchar();
return 0;
}