master
bel 2022-01-29 18:40:13 -07:00
parent 9e24ca3c65
commit 546805cd71
1 changed files with 1 additions and 0 deletions

View File

@ -224,6 +224,7 @@ func (ntg NTGVision) SearchZips(zips []string) ([]Job, error) {
func (ntg NTGVision) workingHours(now time.Time) bool {
// TODO assert M-F 9-4 EST
now = now.In(time.FixedZone("EST", -5*60*60))
logtr.Debugf("ntg.workingHours: %s: weekday=%v (sun=%v, sat=%v), hour=%v (ok=9..16)", now.String(), now.Weekday(), time.Sunday, time.Saturday, now.Hour())
switch now.Weekday() {
case time.Sunday, time.Saturday:
return false