FW: Setting time zone in c language

Olson, Arthur David (NIH/NCI) [E] olsona at dc37a.nci.nih.gov
Tue Apr 15 19:58:06 UTC 2008

I'm (belatedly) forwarding this message from vinod L R, who is not on the time zone mailing list.

Those of you who are on the time zone mailing list, please direct replies appropriately.


From: Vinod L R [mailto:vinodl at aztecsoft.com] 
Sent: Tuesday, April 08, 2008 1:25
To: tz at lecserver.nci.nih.gov
Subject: Setting time zone in c language

I have a GUI interface ,where in user selects the Area (for ex: Africa) and Zone name(for ex: Cairo).How do i map this /etc/TZ file,as there will be different Area and Zone
to be set.Is there any functions in "C' which would solve my issue or any other method ?
I found that uClibc uses /etc/TZ to set the time zone it does not use /etc/localtime nor does it understand the timezone data .so will changing UCLIBC_TZ_FILE_PATH it to /etc/localtime in uClibc-0.9.29.config file will solve my issue??
how do I map this to /etc/localtime so as to set a valid timezone.
The procedure I tried is :
ln -sf /usr/share/zoneinfo/Africa/Cairo /etc/localtime.
alternatively I find that executing echo CET-1DST >/etc/TZ does work.
Please update me on how to solve this issue in C program ( for ex: Take Africa/Cairo as input and convert to its respective daylight saveing time as above ) 
This email message and its attachments may contain CONFIDENTIAL AND PRIVILEGED INFORMATION intended for the sole use of the addressee(s). If you have received it in error, please contact the sender by return email, notify your system manager and destroy the original message and any copies thereof. Any review, use, disclosure or distribution is unlawful. Please check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.
The Company reserves the right to monitor, review and store the content of all messages sent to or from this e-mail address. 


More information about the tz mailing list