Operating System - HP-UX
1752563 Members
4973 Online
108788 Solutions
New Discussion юеВ

Re: Help me read the tztab file

 
SOLVED
Go to solution
Robert DJ
Frequent Advisor

Help me read the tztab file

Hi All,

We would require you to kindly let me know how i can read the tztab file.

Further to this, i have set Timezone for Europe, which is mentioned below,

# Middle European Time, Middle European Time Daylight Savings Time
MET-1METDST
0 3 25-31 3 1983-2038 0 METDST-2
#0 2 24-30 9 1983-1995 0 MET-1
0 2 25-31 10 1996-2038 0 MET-1

When a file is transfered from one system to another system, the timestamp changes by 1 hour.

e.g: test.txt was created by 4:00 AM and is transfered to the another system for verification, the time changes to one hour ahead, like test.txt with time as 5:00 AM.

Please do help me in sorting out this Issue.

Any help would be really appreciated.

Thank you.

Regards,
RDJ
Robert DJ
20 REPLIES 20
Robert DJ
Frequent Advisor

Re: Help me read the tztab file

Hi Again,

I am able to read the tztab file, but want explanation on why the time difference is happening with nearly 1 hour.

Any help would be greatly appreciated.

Thank you.

Regards,
RDJ
Robert DJ
Dennis Handly
Acclaimed Contributor
Solution

Re: Help me read the tztab file

>Help me read the tztab file

This is described in tztab(4) and TZ with environ(5).

>When a file is transfered from one system to another system, the timestamp changes by 1 hour.

(What are you doing to prevent the timestamp from changing to the current time when you do this?)

That suggests one of the machines has the wrong time or TZ isn't set correctly.

What does "date -u" show on each machine?
(Right now it should show: Tue Nov 14 07:10:45 UTC 2006)

What does the following show for the file on each machine:
TZ=GMT0 ll file-name

If both of these commands show the same time, then the problem is with different TZ settings or tztab.
Kent Ostby
Honored Contributor

Re: Help me read the tztab file

Robert -- More than likely the TZ are set differently on the two machines.

On each machine do the following:

env | grep TZ

what do they show?
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Robert DJ
Frequent Advisor

Re: Help me read the tztab file

Hi Kent & Denis,

Thank you for response!!!

Here are the few things which was been asked and please find them as below. I have verified in both the Servers.

Server 1:
serv1a$ date -u
Tue Nov 14 11:06:54 UTC 2006
serv1a$ date
Tue Nov 14 12:07:20 MET 2006
serv1a$ echo $TZ
MET-1METDST

Server 2:
serv2a$ date -u
Tue Nov 14 11:09:25 UTC 2006
serv2a$ date
Tue Nov 14 12:09:39 MET 2006
serv2a$ echo $TZ
MET-1METDST

Please do the needful.

Thank you.

Regards,
RDJ
Robert DJ
OldSchool
Honored Contributor

Re: Help me read the tztab file

I doubt that this is the issue, but could you please check the contents of the file "/etc/TIMEZONE" on both machines?.
OldSchool
Honored Contributor

Re: Help me read the tztab file

I just re-read the original post, and you are "transferring" the file.

Is the file being transferred w/ a cronjob? Does that job run about 1 hour after the file would have been created?

rcp and ftp are going to time-stamp the destination file w/ the time that the transfer occurred. Is this the difference you are seeing?
Dennis Handly
Acclaimed Contributor

Re: Help me read the tztab file

>Robert DJ Nov 14, 2006 12:11:41 GMT
serv1a$ date -u
Tue Nov 14 11:06:54 UTC 2006

Did you reply an hour after you did the above command? If not, both your machines have the wrong time set.

And as OldSchool and I have asked, how are you making sure the files have the original timestamp when you "transfer" them?
Bill Hassell
Honored Contributor

Re: Help me read the tztab file

> timestamp changes...

Several things happen when you transfer a file. The local machine with the original file has a timestamp that is based on the current value of $TZ (and that is not necessarily the /etc/TIMEZONE setting). Then, depending on the transfer method, the remote machine may interpret the local timestamp differently. For instance, ftpd inherits the $TZ value from /etc/TIMEZONE but if ftpd were killed and started by someone with a different $TZ value, new files can have a different timestamp.

How are is the file transferred (what command)?


Bill Hassell, sysadmin
Robert DJ
Frequent Advisor

Re: Help me read the tztab file

Hi Dennis, Old School & Bill,

Thank you for you response!!!

I had taken the time from the servers at 11:00 AM. which looked similar with no change.The servers is located in Middle Europe the time is GMT+1.

The file is being transfered using a cronjob with ftpd!!

The cronjob runs constant to check a particular directory for files which needs to be transfered to the other server.

Hope this explains.

Thank you and please let me know how we can go about this.

Any help great appreciated.

Thank you.

Regards,
RDJ
Robert DJ