Browse Source

no message

xingzai 1 year ago
parent
commit
428f90e114
2 changed files with 11 additions and 1 deletions
  1. 11 0
      controllers/report_selection.go
  2. 0 1
      utils/common.go

+ 11 - 0
controllers/report_selection.go

@@ -2,6 +2,7 @@ package controllers
 
 import (
 	"encoding/json"
+	"fmt"
 	"hongze/hongze_cygx/models"
 	"hongze/hongze_cygx/services"
 	"hongze/hongze_cygx/utils"
@@ -306,3 +307,13 @@ func (this *ReportSelectionController) AddStopTime() {
 	br.Success = true
 	br.Msg = "操作成功"
 }
+
+func init() {
+	st, _ := time.ParseDuration("-500s")
+	fmt.Println(st)
+	fmt.Println()
+	fmt.Println("50秒之后的时间:", time.Now().Add(st))
+
+	startDate := time.Now().Add(-time.Second * 300).Format(utils.FormatDateTime)
+	fmt.Println(startDate)
+}

+ 0 - 1
utils/common.go

@@ -727,7 +727,6 @@ func StrDateTimeToWeek(strTime string) string {
 		"Sunday":    "周日",
 	}
 	var ctime = StrTimeToTime(strTime).Format("2006-01-02")
-	fmt.Println(ctime)
 	startday, _ := time.Parse("2006-01-02", ctime)
 	staweek_int := startday.Weekday().String()
 	return WeekDayMap[staweek_int]