Documentation ¶ Index ¶ func AsTime(ts *timestamppb.Timestamp, def time.Time) time.Time func ParseTimeOrDuration(str string, now time.Time) (time.Time, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func AsTime ¶ func AsTime(ts *timestamppb.Timestamp, def time.Time) time.Time func ParseTimeOrDuration ¶ func ParseTimeOrDuration(str string, now time.Time) (time.Time, error) ParseTimeOrDuration parses a time string or duration string (e.g. 1h30m) and returns a time.Time. At a minimum, this function supports RFC3339Nano, Go durations, and our own TimestampFormat (local). Types ¶ This section is empty. Source Files ¶ View all Source files timeutils.go Click to show internal directories. Click to hide internal directories.