Skip to content

Commit

Permalink
all: upd chlog
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Jun 20, 2023
1 parent c5b614d commit 8543868
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -25,6 +25,9 @@ NOTE: Add new changes BELOW THIS COMMENT.

### Added

- The ability to set inactivity periods for filtering blocked services per
client in the configuration file ([#951]). The UI changes are coming in the
upcoming releases.
- The ability to set inactivity periods for filtering blocked services in the
configuration file ([#951]). The UI changes are coming in the upcoming
releases.
Expand Down
2 changes: 1 addition & 1 deletion internal/filtering/blocked.go
Expand Up @@ -59,7 +59,7 @@ type BlockedServices struct {
func (s *BlockedServices) Clone() (c *BlockedServices) {
return &BlockedServices{
Schedule: s.Schedule.Clone(),
IDs: append([]string{}, s.IDs...),
IDs: slices.Clone(s.IDs),
}
}

Expand Down
11 changes: 3 additions & 8 deletions internal/schedule/schedule.go
Expand Up @@ -6,7 +6,6 @@ import (
"time"

"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/log"
"github.com/AdguardTeam/golibs/timeutil"
"gopkg.in/yaml.v3"
)
Expand All @@ -31,14 +30,10 @@ func EmptyWeekly() (w *Weekly) {

// Clone returns a deep copy of a weekly.
func (w *Weekly) Clone() (c *Weekly) {
tz := w.location.String()
loc, err := time.LoadLocation(tz)
if err != nil {
log.Debug("schedule: cloning location: %s", err)
}

// NOTE: Do not use time.LoadLocation, because the results will be
// different on time zone database update.
return &Weekly{
location: loc,
location: w.location,
days: w.days,
}
}
Expand Down

0 comments on commit 8543868

Please sign in to comment.