diff options
author | Markus Holtermann <info@markusholtermann.eu> | 2013-01-25 20:02:22 +0100 |
---|---|---|
committer | Markus Holtermann <info@markusholtermann.eu> | 2013-01-25 20:02:22 +0100 |
commit | 7f21700fd1f151fbe277f22c46bfbdfd8745bb82 (patch) | |
tree | c4fb4be2dc72da0623771d5d63d6ae215406b26f /bvggrabber | |
parent | 61ff7e0dee4e8f13463667b6e8eed1ad76215585 (diff) | |
download | bvg-grabber-7f21700fd1f151fbe277f22c46bfbdfd8745bb82.tar.gz bvg-grabber-7f21700fd1f151fbe277f22c46bfbdfd8745bb82.tar.bz2 bvg-grabber-7f21700fd1f151fbe277f22c46bfbdfd8745bb82.zip |
Fix travis#13
Diffstat (limited to 'bvggrabber')
-rw-r--r-- | bvggrabber/api/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bvggrabber/api/__init__.py b/bvggrabber/api/__init__.py index 2d263fb..dbffe6c 100644 --- a/bvggrabber/api/__init__.py +++ b/bvggrabber/api/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import json +import re from datetime import datetime from dateutil.parser import parse @@ -30,7 +31,7 @@ class Departure(object): # We assume to get a UNIX / POSIX timestamp self.when = datetime.fromtimestamp(when) elif isinstance(when, str): - self.when = parse(when, fuzzy=True) + self.when = parse(re.sub('[\s*]$', '', when)) #if (self.when - self.now).total_seconds() < -60: # self.when = self.when + timedelta(days=1) elif isinstance(when, datetime): |