diff options
author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-05-23 11:48:14 +0200 |
---|---|---|
committer | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-05-23 11:48:14 +0200 |
commit | d96fe037291f81fddce35727a96fca6916362d26 (patch) | |
tree | dcea255d778280624b71f87c13e2c8234499fa8d | |
parent | b99eda48f955983a14aa89fdc5ed7ec656e84c36 (diff) | |
download | kittystore-d96fe037291f81fddce35727a96fca6916362d26.tar.gz kittystore-d96fe037291f81fddce35727a96fca6916362d26.tar.xz kittystore-d96fe037291f81fddce35727a96fca6916362d26.zip |
Convert time to UTC
-rwxr-xr-x | to_mongo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/to_mongo.py b/to_mongo.py index a1e1df3..379dfaf 100755 --- a/to_mongo.py +++ b/to_mongo.py @@ -22,9 +22,9 @@ TOTALCNT = 0 def convert_date(date_string): """ Convert the string of the date to a datetime object. """ - date_string = date_string.strip() + date_string = date_string.split('(')[0].strip() dt = parse(date_string) - return dt + return dt.astimezone(tz.tzutc()) def to_mongo(mbfile, database): |