Open ch1bo opened 5 years ago
I'm back for a while and will look at this.
I'm not sure this is working quite right. I've got the following ics file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN
BEGIN:VEVENT
SUMMARY:My Event
DTSTART;VALUE=DATE:20190525
DTEND;VALUE=DATE:20190527
DTSTAMP;VALUE=DATE-TIME:20190115T121456Z
UID:597EO5CA0QVBL9JRC8LNSEPNAYBD6650RJ2B
SEQUENCE:0
DESCRIPTION:description
LOCATION:location
END:VEVENT
END:VCALENDAR
which ical2org -scheduled
translates to:
* My Summary
SCHEDULED: <2019-05-25 Sat 02:00>--<2019-05-27 Sat 02:00>
# other stuff here
Which is basically correct, save for the 02:00 o'clock (in general, all times seem to be off by 1 or 2 hours). But this is practically useless, unless you throw away old events. Otherwise, org-agenda will still show you these old events (unless you manually specify -after
).
Now -active
is what you really want, but this doesn't seem to support date ranges yet?
The offsets are due to the likely case of you being in a tome zone 1 or 2 hours off utc and my changes showing the local times. So maybe in this case, where no time zone data (or no times at all?) is present in the event, the conversion should not output local tines?
About the active vs. scheduled: I am using the scheduled property in my agenda and thus only updated that. I will fix the --active as well if desired
I'd really like the --active
to be fixed and your suggestion sounds fine: leave out the local times in case of doubt.
Also makes
--deadline
and--schedule
not mutually exclusive (which surprised me).As the changes are really minimal, I added it on top of #20 - I can split it into 2 or more PRs though or squash everything, whatever is required.