summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/WT/GedcomRecord.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/WT/GedcomRecord.php b/library/WT/GedcomRecord.php
index 676b9b7bba..8c18699fe6 100644
--- a/library/WT/GedcomRecord.php
+++ b/library/WT/GedcomRecord.php
@@ -735,8 +735,10 @@ class WT_GedcomRecord {
if ($chan) {
// The record does have a CHAN event
$d = $chan->getDate()->MinDate();
- if (preg_match('/^(\d\d):(\d\d):(\d\d)/', get_gedcom_value('DATE:TIME', 2, $chan->getGedcom()).':00', $match)) {
+ if (preg_match('/\n3 TIME (\d\d):(\d\d):(\d\d)/', $chan->getGedcom(), $match)) {
$t=mktime((int)$match[1], (int)$match[2], (int)$match[3], (int)$d->Format('%n'), (int)$d->Format('%j'), (int)$d->Format('%Y'));
+ } elseif (preg_match('/\n3 TIME (\d\d):(\d\d)/', $chan->getGedcom(), $match)) {
+ $t=mktime((int)$match[1], (int)$match[2], 0, (int)$d->Format('%n'), (int)$d->Format('%j'), (int)$d->Format('%Y'));
} else {
$t=mktime(0, 0, 0, (int)$d->Format('%n'), (int)$d->Format('%j'), (int)$d->Format('%Y'));
}