Linux OS timezone information file, question.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Linux OS timezone information file, question.
# 1  
Old 05-20-2010
Linux OS timezone information file, question.

Hi everybody,
I have a task on my hands, the goal of the task is to overwrite the time zone information for the linux OS, I have searched and found that the this data is stored in the file /etc/localtime, the thing I want to ask about is the structure of the file as described in the tzfile manual page, I have read it all many times but I could not understand for what each member of the file stands for and the meaning of it, for example the following variables what is the meaning for each and what value should be filled with, as in the first one: UTC/local indicator ???, I did not understand it and so for the following others, could anybody be of help to me and explain the things that I do not understand and if possible provide me with some c code that could create a file with such specifics.
tzh_ttisgmtcnt
The number of UTC/local indicators stored in the file.

tzh_ttisstdcnt
The number of standard/wall indicators stored in the file.

tzh_leapcnt
The number of leap seconds for which data is stored in the file.

tzh_timecnt
The number of "transition times" for which data is stored in the
file.

tzh_typecnt
The number of "local time types" for which data is stored in the
file (must not be zero).

tzh_charcnt
The number of characters of "timezone abbreviation strings"
Thanks for all the efforts.
# 2  
Old 05-20-2010
Do you know about zic? It takes files humans can read and makes a timezone file from it. Compiled timezone files for every timezone already exist, and you can download them.

So, what are you required to do that is beyond sitting down and writing a rules file and compiling it or downloading what you need already compiled?
# 3  
Old 05-20-2010
If you do not need to programmatically change the timezone, but rather compile a new zoneinfo file, the following should help you: Linux Online - What are Time Zones?
# 4  
Old 05-20-2010
change the TZ variable according to your need.
it will be defaulted to GMT ..
if you want have malaysia time i.e GMT+8.00 hrs..

so change the variable to TZ= Mal + 8..

let us know what do you want to do exactly like to change the time during running the application or shell script or...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Changing only time zone file not the timezone without reboot

Hello all, I just want to update the timezone file with new file to update the time, so the zone in /etc/TIMEZONE will be the same but the file it refers to will be changed, and the local time should be changed, can this take effect without rebooting Solaris 10? (9 Replies)
Discussion started by: Amr.Es
9 Replies

2. Solaris

[Solved] Question changing timezone rules / zic

Dear, One of our customer which is located in Iraq/Baghdad, has informed us about a official change in daylight saving time in few days later and has asked us to fix this issue. So, the current timezone of that system is set as 'Asia/Baghdad' which is correct. however to fix the issue I went... (0 Replies)
Discussion started by: Anti_Evil
0 Replies

3. Homework & Coursework Questions

Linux displaying content information

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Using the fixed length field file called famous.dat make a one-line Unix command - using pipe(s) - to display an... (5 Replies)
Discussion started by: wizardoz123456
5 Replies

4. Red Hat

Red Hat linux fault information

Hi, I want to do some fault association analysis in red hat linux. who can tell me where I can get all of the fault information, and the detailed description about this fault information. Thank you very much. (4 Replies)
Discussion started by: zhaoyy
4 Replies

5. Red Hat

Information About Solid State Disk in Linux

Hello, I have few HDD and SSD installed in my RHEL 5 server. I want to know which disk are SDD and which are HDD. What command should I use? Thanks (3 Replies)
Discussion started by: fahdmirza
3 Replies

6. Infrastructure Monitoring

How to get the Linux system information?

Hi, How to get the Linux system hardware and software basic information using terminal command ? Here below i have specified some of the information i need. Please have a look at this and guide me. OS Name: OS Version : OS Manufacturer: OS Configuration: OS Build Type:... (6 Replies)
Discussion started by: forumguest
6 Replies

7. UNIX for Advanced & Expert Users

Solaris and Linux system information.

Hey, I have a program that takes more time on a solaris machine than on a linux machine. So I guess the best way to know whats going on is to compare the two systems ? CPU and Memory ? Is there any other parameter that I should look at ? So on the linux box I ran: And on the Solaris: ... (6 Replies)
Discussion started by: the_learner
6 Replies

8. Programming

Finding timezone information

how to extract current/existing timezone information ?? (2 Replies)
Discussion started by: kartik.patel
2 Replies

9. Linux

can C language received information from Linux/Unix

Hi ! Can C -langauge interface with Unix/Linux? Currently i have written a application for SMS using C programing. I would like to know if i am able to receive information from Unix/Linux so that it can activate the application. (5 Replies)
Discussion started by: JOHNSON
5 Replies

10. UNIX for Dummies Questions & Answers

linux question, pardon, on long file names

Sorry, hope no one minds the linux question here, I use both unix and linux, and have come across a problem. On my linux box i have a dual boot, and i've set it up so i can access my windows data partition while in linux mode (mount the vfat partition), but linux doesn't recognize long file names,... (2 Replies)
Discussion started by: kymberm
2 Replies
Login or Register to Ask a Question