#include #include #define CGI_311 main(int argc, char *argv[]) { char timestr[30] = "notime"; char datestr[30] = "nodate"; char junk[80]; struct tm *timerec; time_t timenum; char GHMonthList[12][4]={"Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec"}; #ifdef CGI_311 freopen(argv[7],"r",stdin); freopen(argv[8],"w",stdout); #endif timenum = time( NULL ); timerec = localtime(&timenum); sprintf( timestr, "%2d:%02d:%02d", timerec->tm_hour, timerec->tm_min, timerec->tm_sec); sprintf( datestr, "%s. %2d, 19%d", GHMonthList[timerec->tm_mon], timerec->tm_mday, timerec->tm_year); printf("\n"); printf("\n"); printf("Server Time\n"); printf("\n"); printf("\n"); printf("

The current time on www.nstep.com is %s on %s.

\n",timestr, datestr); printf("
\n"); printf("This script was developed by "); printf("Instep Enterprises, Inc.\n"); printf("\n"); printf("\n"); }