fix offset to not need system timezone

This commit is contained in:
Bel LaPointe
2022-01-27 20:04:31 -07:00
parent 6551fb906d
commit 9e24ca3c65
2 changed files with 3 additions and 7 deletions

View File

@@ -7,10 +7,10 @@ import (
func TestWorkingHoursNTG(t *testing.T) {
ntg := NTGVision{}
if !ntg.workingHours(time.Date(2022, 1, 27, 12, 0, 0, 0, time.Local)) {
if !ntg.workingHours(time.Date(2022, 1, 27, 12, 0, 0, 0, time.FixedZone("MST", -7*60*60))) {
t.Fatal("noon MST not ok")
}
if ntg.workingHours(time.Date(2022, 1, 27, 23, 0, 0, 0, time.Local)) {
if ntg.workingHours(time.Date(2022, 1, 27, 23, 0, 0, 0, time.FixedZone("MST", -7*60*60))) {
t.Fatal("midnight MST ok")
}
}