[Remind-Fans] Bug in rem2ics script
Shane Kerr
shane at isc.org
Mon Sep 13 09:42:40 EDT 2010
Anthony,
I found the rem2ics script on the Remind wiki:
http://wiki.43folders.com/index.php/Rem2ics
Unfortunately, it has a bug when calculating end time of meetings.
Here's a one-line patch to fix it:
--- rem2ics.org 2010-09-13 15:32:11.000000000 +0200
+++ rem2ics 2010-09-13 15:33:12.144098839 +0200
@@ -18,7 +18,7 @@
print "BEGIN:VEVENT"
if ($5 != "*"){
printf("DTSTART:%dT%02d%02d00\n",$1,$5/60,$5%60)
-printf("DTEND:%dT%02d%02d00\n",$1,$5/60+$4/60,$5%60+$4%60)
+printf("DTEND:%dT%02d%02d00\n",$1,($5+$4)/60,($5+$4)%60)
print "SUMMARY:" substr($0,match($0,$7))
} else {
printf("DTSTART:%d\n",$1)
Since the old method got the remainder for minutes and then added them
together, you could end up with appointment end times like this:
DTEND:20100906T116000
YYYYmmdd HHMMSS
A meeting scheduled at 10:30 that lasts a half hour will have this
happen under the old script.
I can update the Wiki if appropriate, even though it seems it's moving
to a new home. If you would prefer to do that yourself, since you are
the author of the script, that's fine. Just let me know!
Thanks,
--
Shane
More information about the Remind-fans
mailing list