chiark / gitweb /
Output the date of first mention, not the current date
authorMatthew Vernon <matthewv@chiark.greenend.org.uk>
Thu, 17 Jan 2019 18:01:50 +0000 (18:01 +0000)
committerMatthew Vernon <matthewv@chiark.greenend.org.uk>
Thu, 17 Jan 2019 18:01:50 +0000 (18:01 +0000)
...this is in the code path where the URL was mentioned on a previous
date, so we should output the date of first mention (self.localfirst)
not the current date (n).

commands.py

index 698bfdbe64c7161b83afba284a580203bfe2ff20..5f436c63fd2b41f95a62399a5893a294939517db 100755 (executable)
@@ -412,7 +412,7 @@ class UrlLog:
         n=time.localtime(time.time())
         s="%02d:%02d" % (self.localfirst.tm_hour,self.localfirst.tm_min)
         if n.tm_yday != self.localfirst.tm_yday:
-            s+=time.strftime(" on %d %B", n)
+            s+=time.strftime(" on %d %B", self.localfirst)
         return s
     def urltype(self):
         z=min(len(urlinfos)-1, self.count-1)