mirror of
https://github.com/gabehf/Koito.git
synced 2026-04-22 20:11:50 -07:00
fix unset location panics
This commit is contained in:
parent
738ac871e6
commit
b3128c164e
3 changed files with 20 additions and 38 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue