From bb1df83d03189582cd812c273a4fd57f2b4b0914 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 25 Jan 2022 15:42:34 +0300 Subject: [PATCH] always check in utc timezone Signed-off-by: Vasiliy Tolstov --- flag_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flag_test.go b/flag_test.go index e83d742..23769f9 100644 --- a/flag_test.go +++ b/flag_test.go @@ -10,6 +10,7 @@ import ( ) func TestLoad(t *testing.T) { + time.Local = time.UTC os.Args = append(os.Args, "-broker", "5566:33") os.Args = append(os.Args, "-verbose") os.Args = append(os.Args, "-wait", "5s") @@ -40,7 +41,7 @@ func TestLoad(t *testing.T) { if cfg.Broker != "5566:33" { t.Fatalf("failed to parse flags broker value invalid: %#+v", cfg) } - if tf := cfg.Time.Format(time.RFC822); tf != "02 Jan 06 14:32 MSK" { - t.Fatalf("parse time error: %v", cfg.Time) + if tf := cfg.Time.Format(time.RFC822); tf != "02 Jan 06 15:04 MST" { + t.Fatalf("parse time error: %s != %s", tf, "02 Jan 06 15:04 MST") } } -- 2.45.2