mygpo: Convert remote timestamps to local time (bug 1036)

Since applying the first half of this fix (converting the times going
*to* mygpo to utc), I've been losing the sync of some episode actions.
Turns out that it's because now the 'since' value is being stored "in
the future", so the next sync misses some episode actions...
This commit is contained in:
Dov Feldstern 2011-07-03 22:51:55 +02:00 committed by Thomas Perl
parent 1c96e189e0
commit e542198e06
1 changed files with 2 additions and 1 deletions

View File

@ -29,6 +29,7 @@ _ = gpodder.gettext
import atexit
import datetime
import calendar
import os
import sys
import threading
@ -417,7 +418,7 @@ class MygPoClient(object):
def convert_from_api(action):
dt = mygpoutil.iso8601_to_datetime(action.timestamp)
since = int(dt.strftime('%s'))
since = calendar.timegm(dt.timetuple())
return ReceivedEpisodeAction(action.podcast, \
action.episode, action.device, \
action.action, since, \