From 5f341d6bc175e2cb046680587eaa281791b91ceb Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Tue, 2 Oct 2007 20:31:23 -0700 Subject: [PATCH] Dates as well as times in output timestamps --- src/ChangeLog | 6 ++++++ src/ftp.c | 6 +++--- src/http.c | 4 ++-- src/main.c | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e0583343..06d4103e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-10-02 Micah Cowan + + * ftp.c (getftp, ftp_loop_internal), http.c (http_loop), main + (main): Use datetime_str instead of time_str, for those who have + potentially long-running sessions. + 2007-09-24 Gisle Vanem * connect.c, init.c, main.c, openssl.c, options.h, sysdep.h, diff --git a/src/ftp.c b/src/ftp.c index 2f5ecd15..d8a18445 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -968,7 +968,7 @@ Error in server response, closing control connection.\n")); expected_bytes ? expected_bytes - restval : 0, restval, &rd_size, len, &con->dltime, flags); - tms = time_str (time (NULL)); + tms = datetime_str (time (NULL)); tmrate = retr_rate (rd_size, con->dltime); total_download_time += con->dltime; @@ -1150,7 +1150,7 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con) restval = 0; /* Get the current time string. */ - tms = time_str (time (NULL)); + tms = datetime_str (time (NULL)); /* Print fetch message, if opt.verbose. */ if (opt.verbose) { @@ -1214,7 +1214,7 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con) /* Not as great. */ abort (); } - tms = time_str (time (NULL)); + tms = datetime_str (time (NULL)); if (!opt.spider) tmrate = retr_rate (len - restval, con->dltime); diff --git a/src/http.c b/src/http.c index 5b9e8bbf..e2cee589 100644 --- a/src/http.c +++ b/src/http.c @@ -2373,7 +2373,7 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer, sleep_between_retrievals (count); /* Get the current time string. */ - tms = time_str (time (NULL)); + tms = datetime_str (time (NULL)); if (opt.spider && !got_head) logprintf (LOG_VERBOSE, _("\ @@ -2442,7 +2442,7 @@ Spider mode enabled. Check if remote file exists.\n")); err = gethttp (u, &hstat, dt, proxy); /* Time? */ - tms = time_str (time (NULL)); + tms = datetime_str (time (NULL)); /* Get the new location (with or without the redirection). */ if (hstat.newloc) diff --git a/src/main.c b/src/main.c index 74435888..43cb344d 100644 --- a/src/main.c +++ b/src/main.c @@ -1036,7 +1036,7 @@ Can't timestamp and not clobber old files at the same time.\n")); { logprintf (LOG_NOTQUIET, _("FINISHED --%s--\nDownloaded: %d files, %s in %s (%s)\n"), - time_str (time (NULL)), + datetime_str (time (NULL)), opt.numurls, human_readable (total_downloaded_bytes), secs_to_human_time (total_download_time), -- 2.39.2