作者 陈志颖

test:测试年榜

@@ -455,10 +455,10 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut @@ -455,10 +455,10 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut
455 // contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local) 455 // contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)
456 // contributionsWealthRankingQuery.EndTime = time.Date(0001, 01, 02, 23, 59, 59, 0, time.Local) 456 // contributionsWealthRankingQuery.EndTime = time.Date(0001, 01, 02, 23, 59, 59, 0, time.Local)
457 //} 457 //}
458 - currentTime := time.Now().Local().Unix()  
459 - if currentTime >= listIntervals[0].IntervalStartTime.Unix() && currentTime <= listIntervals[0].IntervalEndTime.Local().Unix() {  
460 - contributionsWealthRankingQuery.StartTime = listIntervals[0].IntervalStartTime.Local()  
461 - contributionsWealthRankingQuery.EndTime = listIntervals[0].IntervalEndTime.Local() 458 + currentTime := time.Now().Unix()
  459 + if currentTime >= listIntervals[0].IntervalStartTime.Unix() && currentTime <= listIntervals[0].IntervalEndTime.Unix() {
  460 + contributionsWealthRankingQuery.StartTime = listIntervals[0].IntervalStartTime
  461 + contributionsWealthRankingQuery.EndTime = listIntervals[0].IntervalEndTime
462 } else { // 当前时间处于空档期 462 } else { // 当前时间处于空档期
463 contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local) 463 contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)
464 contributionsWealthRankingQuery.EndTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local) 464 contributionsWealthRankingQuery.EndTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)
@@ -476,11 +476,11 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut @@ -476,11 +476,11 @@ func (statisticsService *StatisticsService) ContributionsWealthRanking(contribut
476 // break 476 // break
477 // } 477 // }
478 //} 478 //}
479 - currentTime := time.Now().Local().Unix() 479 + currentTime := time.Now().Unix()
480 for _, listInterval := range listIntervals { 480 for _, listInterval := range listIntervals {
481 - if currentTime >= listInterval.IntervalStartTime.Local().Unix() && currentTime <= listInterval.IntervalEndTime.Local().Unix() {  
482 - contributionsWealthRankingQuery.StartTime = listInterval.IntervalStartTime.Local()  
483 - contributionsWealthRankingQuery.EndTime = listInterval.IntervalEndTime.Local() 481 + if currentTime >= listInterval.IntervalStartTime.Unix() && currentTime <= listInterval.IntervalEndTime.Unix() {
  482 + contributionsWealthRankingQuery.StartTime = listInterval.IntervalStartTime
  483 + contributionsWealthRankingQuery.EndTime = listInterval.IntervalEndTime
484 break 484 break
485 } else { // 当前时间处于空档期 485 } else { // 当前时间处于空档期
486 contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local) 486 contributionsWealthRankingQuery.StartTime = time.Date(0001, 01, 02, 0, 0, 0, 0, time.Local)