fix unset location panics

This commit is contained in:
Gabe Farrell 2026-01-10 01:11:02 -05:00
parent 738ac871e6
commit b3128c164e
3 changed files with 20 additions and 38 deletions

View file

@ -59,6 +59,9 @@ const (
func ListenActivityOptsToTimes(opts ListenActivityOpts) (start, end time.Time) {
now := time.Now()
loc := opts.Timezone
if loc == nil {
loc, _ = time.LoadLocation("UTC")
}
// If Year (and optionally Month) are specified, use calendar boundaries
if opts.Year != 0 {