Eric, Eric S Fraga writes: > Guido Van Hoecke writes: > > [...] > >> My ics file had a.o. my elder sister's birthday, and unfortunately her's >> as well as mine is (way) before the start of the epoch, so mktime >> returns a negative timestamp at line 63 and strftime at line 143 doesn't >> grok it. > > Ah, I see. The script should at least not break just because some of us > (me included) are older than Unix... ;-) > > The fix should be straightforward. Could you try adding the lines > > if (timestamp < 0) timestamp = 0; > > after the call to mktime in the datetimestamp function? This should at > least make the script not crap out although obviously the date will be > wrong (set to start of epoch). If this works, I will update the script > on Worg and put in a warning message of some sort, maybe even in the > entry itself. With this change the script assigns the wrong date, but no longer stops. > Suggestions on how to handle this case would be welcome, of course. I created a patch so that the date and time string is built directly from the iCal data for times before the epoch. This function produces valid date/time strings albeit without weekday info. Patch file is attached.