mirror of
https://github.com/fiatjaf/nak.git
synced 2026-02-03 23:46:12 +00:00
check dateparser error before using date.Time
This commit is contained in:
committed by
fiatjaf_
parent
b5de7b78bc
commit
49345333c4
2
flags.go
2
flags.go
@@ -105,10 +105,10 @@ func (t *naturalTimeValue) Set(value string) error {
|
|||||||
DefaultTimezone: time.Local,
|
DefaultTimezone: time.Local,
|
||||||
CurrentTime: time.Now(),
|
CurrentTime: time.Now(),
|
||||||
}, value)
|
}, value)
|
||||||
ts = date.Time
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
ts = date.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.timestamp != nil {
|
if t.timestamp != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user