dtend is better

This commit is contained in:
Dmitry Belyaev 2018-04-13 23:37:25 +03:00
parent bc9d60c844
commit d52db0c74b
Signed by: b4tman
GPG Key ID: 014E87EC54B77673

View File

@ -8,8 +8,6 @@ from bisect import bisect
import yaml import yaml
from icalendar import Calendar, Event from icalendar import Calendar, Event
one_day = datetime.date(1, 1, 2) - datetime.date(1, 1, 1)
event_config = {'description': '', 'categories': '', 'language': ''} event_config = {'description': '', 'categories': '', 'language': ''}
zsigns = [(1, 20, ''), (2, 18, ''), (3, 20, ''), (4, 20, ''), zsigns = [(1, 20, ''), (2, 18, ''), (3, 20, ''), (4, 20, ''),
@ -85,7 +83,7 @@ def make_event(person, year):
event.add('dtstamp', datetime.datetime( event.add('dtstamp', datetime.datetime(
event_date.year, event_date.month, event_date.day)) event_date.year, event_date.month, event_date.day))
event.add('dtstart', event_date) event.add('dtstart', event_date)
event.add('duration', one_day) event.add('dtend', event_date)
event.add('created', datetime.datetime.utcnow()) event.add('created', datetime.datetime.utcnow())
event.add('last-modified', datetime.datetime.utcnow()) event.add('last-modified', datetime.datetime.utcnow())
return event return event