Solved

reading tzdatabase for timezone definitions

Posted on 2014-04-10
5
156 Views
Last Modified: 2015-05-28
Hi Experts,
I need to programmatically read timezone info.  For example, if given America/New_York, I want to get all the following information.

"America/New_York","EST","Eastern Standard Time","EDT","Eastern Daylight Time","-05:00:00","+01:00:00","2;0;3","+02:00:00","1;0;11","+02:00:00"
0
Comment
Question by:ambuli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39992200
You will find all necessary source code at the official page for the tz db: http://www.iana.org/time-zones - or a little more precise at http://www.iana.org/time-zones/repository/releases/tzcode2014b.tar.gz

See also http://en.wikipedia.org/wiki/Tz_database#Data_structure

The reference source code includes such a compiler called zic (zone information compiler), as well as code to read those files and use them in standard APIs such as localtime() and mktime().
0
 

Author Comment

by:ambuli
ID: 39992368
Thank you JKR.  Is there any library APIs.   I am looking at the code for zdump but that seems very complicated....
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 500 total points
ID: 39992988
I am afraid that 'zdump.c' really seems to be what you are looking for - however it's quite poorly documented :-/
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question