mirror of https://github.com/aria2/aria2
2010-10-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use RFC1123 date format in debug log of MDTM response and last-modified time and creation date of .torrent file printed using -S. * src/FtpNegotiationCommand.cc * src/RequestGroup.cc * src/bittorrent_helper.ccpull/1/head
parent
f207f3cea5
commit
119b9a8448
|
@ -1,3 +1,12 @@
|
|||
2010-10-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Use RFC1123 date format in debug log of MDTM response and
|
||||
last-modified time and creation date of .torrent file printed
|
||||
using -S.
|
||||
* src/FtpNegotiationCommand.cc
|
||||
* src/RequestGroup.cc
|
||||
* src/bittorrent_helper.cc
|
||||
|
||||
2010-10-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Bump up version number to 1.10.4
|
||||
|
|
|
@ -335,16 +335,9 @@ bool FtpNegotiationCommand::recvMdtm()
|
|||
if(status == 213) {
|
||||
if(lastModifiedTime.good()) {
|
||||
getRequestGroup()->updateLastModifiedTime(lastModifiedTime);
|
||||
time_t t = lastModifiedTime.getTime();
|
||||
struct tm* tms = gmtime(&t); // returned struct is statically allocated.
|
||||
if(tms) {
|
||||
if(getLogger()->debug()) {
|
||||
getLogger()->debug("MDTM result was parsed as: %s GMT", asctime(tms));
|
||||
}
|
||||
} else {
|
||||
if(getLogger()->debug()) {
|
||||
getLogger()->debug("gmtime() failed for MDTM result.");
|
||||
}
|
||||
if(getLogger()->debug()) {
|
||||
getLogger()->debug("MDTM result was parsed as: %s",
|
||||
lastModifiedTime.toHTTPDate().c_str());
|
||||
}
|
||||
} else {
|
||||
if(getLogger()->debug()) {
|
||||
|
|
|
@ -1243,9 +1243,8 @@ void RequestGroup::setURISelector(const SharedHandle<URISelector>& uriSelector)
|
|||
void RequestGroup::applyLastModifiedTimeToLocalFiles()
|
||||
{
|
||||
if(!pieceStorage_.isNull() && lastModifiedTime_.good()) {
|
||||
time_t t = lastModifiedTime_.getTime();
|
||||
logger_->info("Applying Last-Modified time: %s in local time zone",
|
||||
ctime(&t));
|
||||
logger_->info("Applying Last-Modified time: %s",
|
||||
lastModifiedTime_.toHTTPDate().c_str());
|
||||
size_t n =
|
||||
pieceStorage_->getDiskAdaptor()->utime(Time(), lastModifiedTime_);
|
||||
logger_->info("Last-Modified attrs of %lu files were updated.",
|
||||
|
|
|
@ -577,14 +577,8 @@ void print(std::ostream& o, const SharedHandle<DownloadContext>& dctx)
|
|||
o << "Comment: " << torrentAttrs->comment << "\n";
|
||||
}
|
||||
if(torrentAttrs->creationDate) {
|
||||
struct tm* staticNowtmPtr;
|
||||
char buf[26];
|
||||
time_t t = torrentAttrs->creationDate;
|
||||
if((staticNowtmPtr = localtime(&t)) != 0 &&
|
||||
asctime_r(staticNowtmPtr, buf) != 0) {
|
||||
// buf includes "\n"
|
||||
o << "Creation Date: " << buf;
|
||||
}
|
||||
o << "Creation Date: " << Time(torrentAttrs->creationDate).toHTTPDate()
|
||||
<< std::endl;
|
||||
}
|
||||
if(!torrentAttrs->createdBy.empty()) {
|
||||
o << "Created By: " << torrentAttrs->createdBy << "\n";
|
||||
|
|
Loading…
Reference in New Issue