diff --git a/z/entry.go b/z/entry.go index d02660e..0af8945 100644 --- a/z/entry.go +++ b/z/entry.go @@ -41,6 +41,10 @@ func NewEntry( } } + if finishTime.Before(beginTime) && finishTime.IsZero() == false { + return Entry{}, errors.New("Beginning time of tracking cannot be after the finish time!") + } + return Entry{ id, beginTime,