Link to home
Start Free TrialLog in
Avatar of tel2
tel2Flag for New Zealand

asked on

Time diffence for FTP clients

Hi Experts,

We run a FTP server (Solaris 9) which various organisations around our country (New Zealand) connect to (ie: we are all in the same time zone).  It seems that some (or possibly all) of them see the files on the server with timestamps which are incorrect by 13 hours.  When we look at the files, the timestamps look correct.  When I log on, TZ is as follows:
    $ echo $TZ
    NZ

What are the likely causes/solutions of/for this difference?

Thanks.
Avatar of sparks1984
sparks1984

What does the /etc/default/init look like?
Also is /etc/TIMEZONE a link to it?
Avatar of tel2

ASKER

Hi Sparks,

Check this out:

$ ls -li /etc/TIMEZONE /etc/default/init
    116437 -r-xr-xr-x   1 root     other        627 May  7  2004 /etc/TIMEZONE
    116436 -r-xr-xr-x   1 root     root         627 May 12  2004 /etc/default/init

Does the fact that 116437 does not = 116436 mean they are not linked (despite what the comment in init says)?

$ diff /etc/TIMEZONE /etc/default/init      # No differences

$ cat /etc/default/init
#ident  "@(#)init.dfl   1.6     00/05/27 SMI"
#
# This file is /etc/default/init.  /etc/TIMEZONE is a symlink to this file.
# This file looks like a shell script, but it is not.  To maintain
# compatibility with old versions of /etc/TIMEZONE, some shell constructs
# (i.e., export commands) are allowed in this file, but are ignored.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables.
#
TZ=NZ
CMASK=022
LC_COLLATE=en_NZ.ISO8859-1
LC_CTYPE=en_NZ.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_NZ.ISO8859-1
LC_NUMERIC=en_NZ.ISO8859-1
LC_TIME=en_NZ.ISO8859-1

And incase it helps:
$ date
Sat Mar  3 16:37:29 NZDT 2007

What do you think?
I would think it would be a link, but since they are the same I guess it doesn't matter. Is this just a vanilla Solaris FTP deamon accepting connerctions or has some modification been done (for example chrooting for anonymous access etc...)? I am thinking that maybe the TZ files are not available in the chroot environment? Not sure...
Especially since it looks like New Zealand is 13 hours from UTC? So maybe if the ftpd does not have access to the files it defaults to UTC. I am just speculating.
Avatar of tel2

ASKER

Hi sparks,

> Is this just a vanilla Solaris FTP deamon accepting connerctions or has some modification been done (for example chrooting for anonymous access etc...)?

No idea, sorry.  Is there some easy way I can tell?

> I am thinking that maybe the TZ files are not available in the chroot environment?

Good point.  The TZ files are in /etc... and chroot is something like /abc/def.  Does that mean the TZ files are definitely not available to the chroot environment?  How do I make them available and make it so the clients will access them?

> Especially since it looks like New Zealand is 13 hours from UTC?

Correct.  13 hours during Daylight Saving time (ie: now), and 12 hours at other times.

> So maybe if the ftpd does not have access to the files it defaults to UTC.

Sounds likely.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of sparks1984
sparks1984

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tel2

ASKER

Thank you very much, spark!

I might try some of that stuff.