12345678910111213141516171819202122 |
- package api
- import (
- "fmt"
- "time"
- "github.com/gin-gonic/gin"
- )
- func Printr(c *gin.Context, apictx *ApiSession) (interface{}, error) {
- loc, _ := time.LoadLocation("Local")
- date := time.Now().Format("2006-01-02")
- startDate := date + " 00:00:00"
- startTime, _ := time.ParseInLocation("2006-01-02 15:04:05", startDate, loc)
- endDate := date + " 23:59:59"
- endTime, _ := time.ParseInLocation("2006-01-02 15:04:05", endDate, loc)
- fmt.Println(startTime.Unix())
- fmt.Println(endTime.Unix())
- return "success", nil
- }
|