4345: TIME on eventdate

svn: r16183
This commit is contained in:
Jérôme Rapinat 2010-11-12 10:19:51 +00:00
parent 6ba569fa68
commit 27ef9f5cdc
2 changed files with 11 additions and 2 deletions

View File

@ -1103,6 +1103,14 @@ class GedcomWriter(UpdateCallback):
self.__date(2, dateobj)
place = None
times = [ attr.get_value() for attr in event.get_attribute_list()
if int(attr.get_type()) == gen.lib.AttributeType.TIME ]
# Not legal, but inserted by PhpGedView
if len(times) > 0 and dateobj:
time = times[0]
self.__writeln(3, 'TIME', time)
if event.get_place_handle():
place = self.dbase.get_place_from_handle(event.get_place_handle())
self.__place(place, 2)

View File

@ -1920,8 +1920,9 @@ class GedcomParser(UpdateCallback):
TOKEN__GODP : self.__event_witness,
TOKEN__WITN : self.__event_witness,
TOKEN__WTN : self.__event_witness,
TOKEN_RELI : self.__ignore,
TOKEN_TIME : self.__ignore,
TOKEN_RELI : self.__ignore,
# Not legal, but inserted by PhpGedView
TOKEN_TIME : self.__event_time,
TOKEN__TIME : self.__event_time,
TOKEN_ASSO : self.__ignore,
TOKEN_IGNORE : self.__ignore,