Issues w/ timezones on gssftpd

Jeffrey Altman jaltman at
Tue Nov 28 01:47:52 EST 2006

Russ Allbery wrote:
> Philip Prindeville <philipp at> writes:
>> As for why not copy the /etc/localtime file? Because some people do some
>> odd things, such as setting TZ in startup scripts, wrappers, etc. before
>> firing up ftpd.  In that case, if the copy of /etc/localtime in the
>> chroot() environment (such as /var/ftp) disagrees with the contents of
>> "TZ", then you're going to get unexpected and possibly undefined
>> behavior.
>> Calling tzset() before calling ctime()/localtime()/strftime() *or*
>> chroot() is the simplest solution that offers consistent behavior in all
>> scenarios.
> Okay, I think I understand now.
> Why not just call tzset unconditionally, in that case?  Are there
> platforms that don't have that function, or where it would cause harm?

Depending on the version of the compiler used on Windows, it is either
tzset or _tzset.  However, we don't build the ftp daemon on Windows
so I don't think we care.

Jeffrey Altman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3355 bytes
Desc: S/MIME Cryptographic Signature
Url :

More information about the krbdev mailing list