/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that return local time. */
#include <stdio.h>
#include <time.h>
#define SIZE 26

int main() {
    struct tm *ptr;
    time_t lt;
    char buf[26];
    
    lt = time(NULL);       //return system time
    printf("time(NULL) = %d\n", lt);
    ptr = localtime(&lt);  // return time in the form of tm structure
    asctime_r(ptr,buf,SIZE);
    printf(buf);
}
