Menu ▾ ▴

#1 Yearly repeated untimed events sometime wrongly computed

open
nobody
None
5
2004-05-16
2004-05-16
No

I've been using palmFile in a project of mine and
stumbled on a somewhat strange problem that seems to
occur only for yearly repeated untimed events.

When I requested all the events in a month (31 days), I
found that an event that I know to be on the 13th of
May was computed as if on the 14th, this year. The
event, pprinted, looks like:

{'alarmAdvType': 2L,
'alarmAdvUnits': 5L,
'alarmSet': True,
'category': 5L,
'duration': 0L,
'endTime': 106095600L,
'note': '##@bE@@@@@@@@@@@@@I\r\n1973',
'position': 2147483647L,
'private': False,
'recordID': 13938724L,
'repeatEvent': {'brand': 5L,
'brandDayNumber': 13L,
'brandMonthIndex': 4L,
'dateExceptionCount': 0,
'endDate': 1956524399L,
'firstDayOfWeek': 0L,
'interval': 1L,
'repeatEventFlag': 32769},
'startTime': 1084514400.0,
'status': 0L,
'text': 'Nuno Filipe Freitas Pedrosa',
'untimed': True}

'brandDayNumer' is ok: 13. However, the startTime is not:

> time.localtime(1084514400.0).tm_mday
14

So, I'm guessing there is something wrong with
getNextRepeatedEvent or perhaps getUpcomingEvents?

Another possibly related bug: I have the event below
being returned to me not only for the correct month
(December), but also for November (on the correct day
on both cases, though)! The pprint is the same in both
cases (!)

{'alarmAdvType': 0L,
'alarmAdvUnits': 4294967295L,
'alarmSet': False,
'category': 8L,
'duration': 0L,
'endTime': 975628800L,
'note': '##@LH@@@@@@@@@@@@@L\r\n',
'position': 2147483647L,
'private': False,
'recordID': 9642168L,
'repeatEvent': {'brand': 5L,
'brandDayNumber': 1L,
'brandMonthIndex': 11L,
'dateExceptionCount': 0,
'endDate': 1956524399L,
'firstDayOfWeek': 0L,
'interval': 1L,
'repeatEventFlag': 32769},
'startTime': 1101859200.0,
'status': 0L,
'text': 'Feriado (Dia da Restauraзгo)!',
'untimed': True}

This time, the startTime is ok:

> time.localtime(1101859200.0).tm_mon
12

It still gets generated when I ask for all the events
within 30 days of November 1st...

Discussion


Log in to post a comment.