/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that displays current time. */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main() {
    struct tm *ptr;
    time_t ltime;
    char str[80];
    
    ltime = time(NULL); /* get current calendar time */
    ptr = localtime(&ltime);  // return time in the form of tm structure    
    strftime(str,80,"It is now %H:%M %p.",ptr);
    printf("%s\n",str);     
}

 
