diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:55:29 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:55:29 +0000 |
commit | f58a97d3de5b43fd2cf8c0928939241b7b01c67d (patch) | |
tree | 4891542955626efe83bf431c67414e4901d33e74 /methods/ftp.cc | |
parent | 70fbac25ae36f62b99a9df1a4a7742a47a8d91ec (diff) |
Moved time handling, fixed makefiles
Author: jgg
Date: 1999-12-10 07:21:52 GMT
Moved time handling, fixed makefiles
Diffstat (limited to 'methods/ftp.cc')
-rw-r--r-- | methods/ftp.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/methods/ftp.cc b/methods/ftp.cc index a7fa83233..1780ac740 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: ftp.cc,v 1.17 1999/12/09 03:45:56 jgg Exp $ +// $Id: ftp.cc,v 1.18 1999/12/10 07:21:52 jgg Exp $ /* ###################################################################### HTTP Aquire Method - This is the FTP aquire method for APT. @@ -498,18 +498,7 @@ bool FTPConn::ModTime(const char *Path, time_t &Time) return true; // Parse it - struct tm tm; - memset(&tm,0,sizeof(tm)); - if (sscanf(Msg.c_str(),"%4d%2d%2d%2d%2d%2d",&tm.tm_year,&tm.tm_mon, - &tm.tm_mday,&tm.tm_hour,&tm.tm_min,&tm.tm_sec) != 6) - return true; - - tm.tm_year -= 1900; - tm.tm_mon--; - - /* We use timegm from the GNU C library, libapt-pkg will provide this - symbol if it does not exist */ - Time = timegm(&tm); + StrToTime(Msg,Time); return true; } /*}}}*/ |