this is something what i have tried and is now giving the right output...
still looking for an easy way out

Code:
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <math.h>

char tzarray[13][3] = {"00", "01", "02", "03", "04", "05", "06", \
"07", "08", "09", "10", "11", "12"};
char tzmin[][3] = {"00", "30"};

int main(void) {
    long dtime = 0;
    short diffhour = 0;
	char diffmin[3] = {"00"};
    char *strtm, *strzone;
    time_t tm1, tm2;
	struct tm *t1, *t2;
    strtm = malloc(120 * sizeof(char));
    strzone = malloc(50 * sizeof(char));
    tm1 = time(NULL);
    t2 = gmtime(&tm1);
    tm2 = mktime(t2);
	t1 = localtime(&tm1);
    dtime = (long)(tm1 - tm2);
/* Print local time as a string */
    strftime(strtm, 100, "%a %b %d %Y %H:%M:%S GMT", t1);
    if (dtime >= 0 )    
		strcat(strtm, "+");
    else 
		strcat(strtm, "-");
	strcat(strtm, tzarray[(short)(abs(dtime) / 3600)]);
    if (1800 == (short)(abs(dtime) % 3600))
		strcat(strtm, tzmin[1]);
	else
		strcat(strtm, tzmin[0]);
    strftime(strzone, 50, " (%Z)", t1);
    strcat(strtm, strzone);
    printf("%s\n\n\n", strtm);
    return 0;
}