From 699b863837e65479b7e406f941bbd11157fcfb1d Mon Sep 17 00:00:00 2001
From: eson <eson.hsm@nonolive.com>
Date: Wed, 9 Dec 2020 10:51:01 +0800
Subject: [PATCH] bug fix

---
 main.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/main.go b/main.go
index 3099bfe..b05b9d8 100644
--- a/main.go
+++ b/main.go
@@ -23,8 +23,10 @@ type CountLiveAnchors struct {
 }
 
 func getArgsStartTime() time.Time {
-	date := flag.Arg(1)
+	flag.Parse()
+	date := flag.Arg(0)
 	if date == "" {
+		// log.Println(flag.)
 		panic("please input date eg. '2020-11-30 16:29:17'")
 	}
 	start, err := time.ParseInLocation("2006-01-02 15:04:03", date, time.Local)