[billreminder] Fixed SQLAlchemy warning where a timestamp was being passed to query instead of datetime object.
- From: Og B. Maciel <ogmaciel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [billreminder] Fixed SQLAlchemy warning where a timestamp was being passed to query instead of datetime object.
- Date: Sat, 2 Jan 2010 03:47:06 +0000 (UTC)
commit a361e50490b313e0cb7f1380e45995118ce80491
Author: Og B. Maciel <ogmaciel gnome org>
Date: Fri Jan 1 22:45:58 2010 -0500
Fixed SQLAlchemy warning where a timestamp was being passed to query instead of datetime object.
src/daemon/alarm.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/daemon/alarm.py b/src/daemon/alarm.py
index 95d5069..2a30ba1 100644
--- a/src/daemon/alarm.py
+++ b/src/daemon/alarm.py
@@ -65,7 +65,7 @@ class Alarm(object):
limit = self.gconf_client.get('notification_days_limit')
print limit
limit = datetime.timedelta(days=limit)
- end=today+limit
+ end = today + limit
if limit:
records = self.parent.actions.get_interval_bills(end=end, paid=False)
#'dueDate <= %s AND paid = 0' % (today + limit))
@@ -205,6 +205,9 @@ class Alarm(object):
startAlarm = now - interval/2
endAlarm = now + interval/2
+
+ startAlarm = datetime.datetime.fromtimestamp(startAlarm)
+ endAlarm = datetime.datetime.fromtimestamp(endAlarm)
records = self.parent.actions.get_alarm_bills(startAlarm, endAlarm, 0)
i = 0
@@ -229,6 +232,5 @@ class Alarm(object):
-1)
i += 1
- print (now - interval, now), records
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]