diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-06-12 20:36:12 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2008-06-12 20:36:12 (GMT) |
commit | 707f90daa6d0780cb621e63d3697baaf0996dd6d (patch) | |
tree | 2ee14ee0ce7b793bc3e2ab11afe87fbaedf5786f /globalhistory.py | |
parent | 0b2b5655cbb8955cbb53663272d9c285498d6e2b (diff) |
Add a last_visit field
Diffstat (limited to 'globalhistory.py')
-rw-r--r-- | globalhistory.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/globalhistory.py b/globalhistory.py index a0ad1b7..811de7e 100644 --- a/globalhistory.py +++ b/globalhistory.py @@ -14,6 +14,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +from datetime import datetime + from xpcom import components from xpcom.components import interfaces from xpcom.server.factory import Factory @@ -42,6 +44,7 @@ class GlobalHistory: place = self._store.lookup_place(uri.spec) if place: place.visits += 1 + place.last_visit = datetime.now() self._store.update_place(place) else: place = places.Place(uri.spec) |