/* 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 after setup the timezone. */
#include <stdio.h>
#include <time.h>

int main() {
    struct tm *local_time, *gm;
    time_t t;
    
    t = time(NULL);
    local_time = localtime(&t);
    printf("Local time and date: %s\n",asctime(local_time));
    gm = gmtime(&t);
    printf("Coordinated Universal Time and date: %s\n",asctime(gm));
    putenv("TZ=:STD03:33:00");
    t = time(NULL);
    local_time = localtime(&t);
    printf("The Changed Local time and date: %s\n",asctime(local_time));
}
