Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Apr 1999 13:06:02 -0800
From:      "David O'Brien" <obrien@NUXI.com>
To:        freebsd-current@freebsd.org
Subject:   Re: Dates off by 1 year (was: Fools Day Joke ?)
Message-ID:  <19990402130602.C64197@nuxi.com>

next in thread | raw e-mail | index | archive | help
Here is the explanation for the problem from the NcFTP author:

----- Forwarded message from Mike Gleason -----

Date: Fri, 02 Apr 1999 12:39:07 -0600
Subject: Re: (FWD) Re: Dates off by 1 year (was: Fools Day Joke ?)

The problem is that NcFTP 3 tries to parse the output of the listing and 
stores it in an internal format, and when the listing is actually 
displayed, it is recreated from the saved data.  I.e., the listing's date 
is converted to a time_t, and then reformatted later.  Due to timezone 
differences between client and server, this can never be 100% accurate 
(until more FTP servers adopt the new machine-readable directory listings).

However, /bin/ls prints two different formats for the date.  One is "mmm dd 
yyyy", and the other is "mmm dd HH:MM".  The second format is used when the 
file is less than six months old, or less than one hour into the future.

The beta 18 code's logic is flawed, since it guesses the year wrong when 
the file is very new and the timezone discrepancy make the preliminary 
time_t conversion appear that the file is "too far" into the future.  The 
good news is that this is easily correctible.

Sorry the wild goose chase :-)
Mike Gleason

----- End forwarded message -----

-- 
-- David    (obrien@NUXI.com  -or-  obrien@FreeBSD.org)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990402130602.C64197>