Hello to all,

I am using localtime() funtion to get information of of time.

But the program is having segmentation fault.

It gives the following type of error from debugger.

/************************************************** ****************/

Program received signal SIGSEGV, Segmentation fault.
0x00a46100 in getenv () from /lib/tls/libc.so.6

#0 0x00a46100 in getenv () from /lib/tls/libc.so.6
#1 0x00aafbcf in tzset_internal () from /lib/tls/libc.so.6
#2 0x00ab07a8 in __tz_convert () from /lib/tls/libc.so.6

/************************************************** ****************/

Same problem is there is I am using either ctime() or gmtime().

So what should I have to use instead of these function to get time.

Or What precautions I have to take.

Please help me if possible.

Any good reply is apprecialble.

Thanking You in advance.