/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints both the local time and 
the UTC of the system. */
#include <stdio.h>
#include <time.h>

int main() {
    struct tm local_time; 
    struct tm result;
    time_t t;
    
    t = time(NULL);
    localtime_r(&t,&local_time);
    printf("Local time and date: %s\n",asctime(&local_time));
    gmtime_r(&t,&result);
    printf("Coordinated Universal Time and date: %s\n",asctime(&result));
}
