Bug 666580 - Inaccurate timestamps
Summary: Inaccurate timestamps
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lftp
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Jiri Skala
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-01 02:36 UTC by JW
Modified: 2014-11-09 22:33 UTC (History)
3 users (show)

Fixed In Version: lftp-4.3.3-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-04 02:42:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to add %s into list of strftime formats requiring exact time (501 bytes, application/octet-stream)
2011-01-01 02:36 UTC, JW
no flags Details

Description JW 2011-01-01 02:36:56 UTC
Created attachment 471305 [details]
Patch to add %s into list of strftime formats requiring exact time

Description of problem:


Version-Release number of selected component (if applicable):
lftp-4.0.9-3

How reproducible:
Always

Steps to Reproduce:
1. lftp -e 'cd /pub/archive/fedora/linux/releases/8/Everything/i386/os/Packages;cls -l --time-style "%s" python-fedora-0*;quit' http://archives.fedoraproject.org
2. lftp -e 'cd /pub/archive/fedora/linux/releases/8/Everything/i386/os/Packages;cls -l --time-style "%04M:%04S" python-fedora-0*;quit' http://archives.fedoraproject.org

Actual results:
1. 28976 1193472930 python-fedora-0.2.90.19-1.fc8.noarch.rpm
2. 28976 0015:0030 python-fedora-0.2.90.19-1.fc8.noarch.rpm

Expected results:
1. 28976 1193472943 python-fedora-0.2.90.19-1.fc8.noarch.rpm
2. 28976 0015:0045 python-fedora-0.2.90.19-1.fc8.noarch.rpm

Additional info:
1. Doing a simple http HEAD command on about produces "Last-Modified: Sat, 27 Oct 2007 08:15:43 GMT" which is equivalent to a timestamp of 1193472943.
2. lftp appears to be throwing away precision for no particular reason. It should always get the maximum possible timestamp precision, especially with http protocol.
3. The section in commands.cc which scans for strftime format specifiers (ie. /exact_fmts/) is totally wrong because it fails to allow for the use of formatter constructs such as "%04H".  If it needs to do this, and it really shouldn't, then it should scan for each % then skip across any width/precision/flags to locate the relevant conversion specifier.

Comment 1 Fedora Update System 2011-11-16 13:04:05 UTC
lftp-4.3.3-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/lftp-4.3.3-1.fc14

Comment 2 Fedora Update System 2011-11-17 23:31:33 UTC
Package lftp-4.3.3-1.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing lftp-4.3.3-1.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16007/lftp-4.3.3-1.fc14
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2011-12-04 02:42:17 UTC
lftp-4.3.3-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.