函数名: localtime
功  能: 把日期和时间转变为结构
用  法: struct tm *localtime(long *clock);
程序例:
#include <time.h>
#include <stdio.h>
#include <dos.h>
int main(void)
{
   time_t timer;
   struct tm *tblock;
   /* gets time of day */
   timer = time(NULL);
   /* converts date/time to a structure */
   tblock = localtime(&timer);
   printf("Local time is: %s", asctime(tblock));
   return 0;
}