作者 tangxvhui

调整启动时间

@@ -7,10 +7,10 @@ import ( @@ -7,10 +7,10 @@ import (
7 ) 7 )
8 8
9 func PushData() { 9 func PushData() {
10 - //每天16点运行 10 + //每天15:30点运行
11 nowTime := time.Now() 11 nowTime := time.Now()
12 y, m, d := nowTime.Date() 12 y, m, d := nowTime.Date()
13 - t1 := time.Date(y, m, d, 16, 0, 0, 0, time.Local) //今天的16点 13 + t1 := time.Date(y, m, d, 15, 30, 0, 0, time.Local) //今天的15:30
14 interval := t1.Sub(nowTime) 14 interval := t1.Sub(nowTime)
15 if interval < 0 { 15 if interval < 0 {
16 interval = (24 * time.Hour) + interval 16 interval = (24 * time.Hour) + interval