Fix time duration value

- Make sure that duration is not < 0
- Handle nil ExpiresAt time in poll
This commit is contained in:
r 2020-02-19 16:33:21 +00:00
parent fe31d4197b
commit dd23ac4867
3 changed files with 12 additions and 4 deletions

View file

@ -126,7 +126,7 @@
<span>{{.Poll.VotesCount}} votes</span>
{{if .Poll.Expired}}
<span> - poll expired </span>
{{else}}
{{else if .Poll.ExpiresAt}}
<span>
- poll ends in
<time datetime="{{FormatTimeRFC3339 .Poll.ExpiresAt}}" title="{{FormatTimeRFC822 .Poll.ExpiresAt}}">