mirror of
https://github.com/photoprism/photoprism.git
synced 2026-07-17 16:49:04 +00:00
10 lines
293 B
Go
10 lines
293 B
Go
package clean
|
|
|
|
import "time"
|
|
|
|
// TimeSet reports whether t points to a meaningful timestamp, i.e. it is non-nil
|
|
// and not the zero time. Useful for nullable *time.Time values where both nil and
|
|
// a zero value mean "unset".
|
|
func TimeSet(t *time.Time) bool {
|
|
return t != nil && !t.IsZero()
|
|
}
|