rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.07k stars 408 forks source link

CommandScheduler::parse_time algorithm working wrong with days #1081

Open wolandmaster opened 3 years ago

wolandmaster commented 3 years ago

The CommandScheduler::parse_time implementation is not correct and producing a wrong result when days are specified along with hours, minutes, and seconds.

For example, the string "02:03:04:05" (2 days 3 hours 4 minutes and 5 seconds) is parsed as 177221 seconds, however, in reality, it is

2 24 60 60 + 3 60 60 + 4 60 + 5 = 183845 seconds.