use unicode tags, don't go under 0 in sync timestamp

This commit is contained in:
Damien Elmes 2008-10-12 04:46:14 +09:00
parent 5a7e053227
commit b0ad2be961
2 changed files with 2 additions and 2 deletions

View file

@ -538,7 +538,7 @@ values
s['day'] = s['day'].toordinal() s['day'] = s['day'].toordinal()
del s['id'] del s['id']
return s return s
lastDay = date.fromtimestamp(self.deck.lastSync - 60*60*24) lastDay = date.fromtimestamp(max(0, self.deck.lastSync - 60*60*24))
ids = self.deck.s.column0( ids = self.deck.s.column0(
"select id from stats where type = 1 and day >= :day", day=lastDay) "select id from stats where type = 1 and day >= :day", day=lastDay)
stat = Stats() stat = Stats()

View file

@ -91,7 +91,7 @@ def parseTags(tags):
return tags return tags
def joinTags(tags): def joinTags(tags):
return ", ".join(tags) return u", ".join(tags)
def findTag(tag, tags): def findTag(tag, tags):
"True if TAG is in TAGS. Ignore case." "True if TAG is in TAGS. Ignore case."