From 3034e14920651846b4fe44f1d4cb2dfa010ada73 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 13 Jan 2014 12:28:09 -0800 Subject: [PATCH] Added timestamp to messages. --- alarmdecoder/messages.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/alarmdecoder/messages.py b/alarmdecoder/messages.py index a5d67cf..ad7b0b7 100644 --- a/alarmdecoder/messages.py +++ b/alarmdecoder/messages.py @@ -13,6 +13,7 @@ devices. """ import re +import datetime from .util import InvalidMessageError @@ -25,11 +26,14 @@ class BaseMessage(object): raw = None """The raw message text""" + timestamp = None + """The timestamp of the message""" + def __init__(self): """ Constructor """ - pass + self.timestamp = datetime.datetime.now() def __str__(self): """