[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/release] Minor tweak to commenting around the leap year bug



commit f2080aad4e069074c8c7320970b51892def719fc
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Wed Feb 29 07:35:00 2012 -0800

    Minor tweak to commenting around the leap year bug
    
    Tweak for the preceeding comment and including the ticket with the comment.
---
 src/cli/logPanel.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/cli/logPanel.py b/src/cli/logPanel.py
index 496fe86..dd22558 100644
--- a/src/cli/logPanel.py
+++ b/src/cli/logPanel.py
@@ -300,12 +300,15 @@ def getLogFileEntries(runlevels, readLimit = None, addLimit = None, config = Non
       # strips the decimal seconds
       if "." in timestamp: timestamp = timestamp[:timestamp.find(".")]
       
-      # overwrites missing time parameters with the local time (ignoring wday
-      # and yday since they aren't used)
+      # Ignoring wday and yday since they aren't used.
+      #
       # Pretend the year is 2012, because 2012 is a leap year, and parsing a
       # date with strptime fails if Feb 29th is passed without a year that's
       # actually a leap year. We can't just use the current year, because we
       # might be parsing old logs which didn't get rotated.
+      #
+      # https://trac.torproject.org/projects/tor/ticket/5265
+      
       timestamp = "2012 " + timestamp
       eventTimeComp = list(time.strptime(timestamp, "%Y %b %d %H:%M:%S"))
       eventTimeComp[8] = currentLocalTime.tm_isdst



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits