|
|
2010-12-01
, 22:16
|
|
Posts: 5 |
Thanked: 2 times |
Joined on Dec 2010
|
#482
|
def iso8601ToTimestamp(date):
"""
@type date: str
"""
# FIXME: Google passes dtstart like 2008-12-10T00:00:00
if not date[-6] in ('+', '-') and not date.endswith('Z'):
date += 'Z'
+ if int(date[0:4]) > 2037:
+ return int(iso8601.parse(string.replace(date, date[:4], "2037", 1)))
return int(iso8601.parse(date))
| The Following User Says Thank You to gdevenyi For This Useful Post: | ||
|
|
2010-12-02
, 00:30
|
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#483
|
|
|
2010-12-03
, 07:21
|
|
Posts: 5 |
Thanked: 12 times |
Joined on Oct 2010
|
#484
|
|
|
2010-12-03
, 14:33
|
|
Posts: 5 |
Thanked: 2 times |
Joined on Dec 2010
|
#485
|
|
|
2010-12-04
, 10:56
|
|
|
Posts: 579 |
Thanked: 471 times |
Joined on Jan 2010
@ Austria
|
#486
|
Thanks. 16 pages of forum threads do not documentation make; so I've added the start of instructions to wiki.maemo.org/Sync.

|
|
2010-12-04
, 11:39
|
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#487
|
I would be willing to help with the wiki, but even after having read through most of the 16 pages, I'm a bit at a loss at how erminig needs to be set up. I've followed the instructions, but after the first sync between my built-in calendar and my google calendar which were synced until now by nuevasync every entry in the future got duplicated.
Do I have to empty one of the calenars before starting the sync with erminig?
And would anyone have a good suggestion of how to clean a google calendar from zillions of duplicated entries...?
|
|
2010-12-04
, 16:07
|
|
|
Posts: 579 |
Thanked: 471 times |
Joined on Jan 2010
@ Austria
|
#488
|
Yeah, I got duplicates as well. You may want to use more titles for entries (e.g. vacation, home, work) to avoid massive work of deleting the duplicates from one calendar. Also, the good way to avoid the duplicates is to use "From Google"-sync only. This way you can't get duplicates. If you let your calendar add entries to the Google Calendar and vice versa you might get duplicates, again.
So in short : use more than one title for entries and sync from Google. One way sync should be fine, two way sync seems to be troublesome, for now (or maybe it's just PEBKAC).
|
|
2010-12-04
, 21:03
|
|
|
Posts: 2,535 |
Thanked: 6,681 times |
Joined on Mar 2008
@ UK
|
#489
|
I would be willing to help with the wiki, but even after having read through most of the 16 pages, I'm a bit at a loss at how erminig needs to be set up. I've followed the instructions, but after the first sync between my built-in calendar and my google calendar which were synced until now by nuevasync every entry in the future got duplicated.
And would anyone have a good suggestion of how to clean a google calendar from zillions of duplicated entries...?
| The Following User Says Thank You to Jaffa For This Useful Post: | ||
|
|
2010-12-04
, 21:04
|
|
|
Posts: 2,535 |
Thanked: 6,681 times |
Joined on Mar 2008
@ UK
|
#490
|
Thanks for this! I look forward to trying it out. Have you considered integrating the other patches floating around in this thread which fix some bugs?
![]() |
| Tags |
| erminig, erminig-ng, ernie nig, google calendar, google sync, synchronization |
| Thread Tools | |
|
It seems that google has a date somehow in there with year > 2038, which is past the Unix Epoch overflow, causing a crash.
This is with the patches provided by thomasvs, which fixes a crash earlier in the sync.
Anyone know of a way to fix this?
Traceback (most recent call last): File "/usr/bin/erminig", line 153, sync_all_profiles(widget=<gtk.ToolButton object at 0x41f79a08 (GtkToolButton at 0x4c71f0)>, data=<hildon.StackableWindow object at 0x41f79030 (HildonStackableWindow at 0x457060)>) id = i[0] do_profile_sync(id, data) variables: {'data': ('local', <hildon.StackableWindow object at 0x41f79030 (HildonStackableWindow at 0x457060)>), 'id': ('local', 1), 'do_profile_sync': ('global', <function do_profile_sync at 0x41fa62f0>)} File "/usr/bin/erminig", line 125, do_profile_sync(id=1, data=<hildon.StackableWindow object at 0x41f79030 (HildonStackableWindow at 0x457060)>) profile['remoteSource'], \ profile['lastUpdate'], progress) variables: {'profile': ('local', {'lastUpdate': 1291137278, 'direction': 0, 'lastLocalUpdate': 1291137281, 'remoteSourceTitle': u'Gabriel Devenyi', 'remoteAccountId': 1, 'enabled': 1, 'localSource': u'1', 'remoteSource': u'myemail', 'localSourceTitle': u'N900', 'id': 1}), 'progress': ('local', <gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>)} File "/usr/share/erminig/erminig_core.py", line 524, syncFromGoogle(pid=1, localSource=u'1', remoteSource=u'myemail', lastSync=1291137278, progress=<gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>) getNewEventsFromGoogle(pid, int(localSource), remoteSource, lastSync, \ progress) variables: {'progress': ('local', <gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>)} File "/usr/share/erminig/erminig_core.py", line 262, getNewEventsFromGoogle(pid=1, localSource=1, remoteSource=u'myemail', lastSync=1291137278, progress=<gtk.ProgressBar object at 0x41f7b210 (GtkProgressBar at 0x4dd8d0)>) else: start_time = iso8601ToTimestamp(e.when[0].start_time) end_time = iso8601ToTimestamp(e.when[0].end_time) variables: {'start_time': ('local', None), 'e.when': ('local', [<gdata.calendar.When object at 0x42061fd0>]), 'iso8601ToTimestamp': ('global', <function iso8601ToTimestamp at 0x4107ab70>)} File "/usr/share/erminig/erminig_core.py", line 136, iso8601ToTimestamp(date='2050-12-24T22:00:00.000Z') return int(iso8601.parse(date)) variables: {'int': ('builtin', <type 'int'>), 'date': ('local', '2050-12-24T22:00:00.000Z'), 'iso8601.parse': ('global', <function parse at 0x4107a470>)} File "/usr/share/erminig/iso8601.py", line 24, parse(s='2050-12-24T22:00:00.000Z') gmt = __extract_date(m) + __extract_time(m) + (0, 0, 0) return time.mktime(gmt) + __extract_tzd(m) - time.timezone variables: {'time.timezone': ('global', 18000), 'time.mktime': ('global', <built-in function mktime>), 'm': ('local', <_sre.SRE_Match object at 0x4107f9a0>), '__extract_tzd': ('global', <function __extract_tzd at 0x4107a5f0>), 'gmt': ('local', (2050, 12, 24, 22, 0, 0, 0, 0, 0))} OverflowError: mktime argument out of range