2020-05-07 16:14:37 +08:00
|
|
|
|
/*
|
|
|
|
|
|
* @Author : huangzj
|
|
|
|
|
|
* @Time : 2020/5/7 9:39
|
|
|
|
|
|
* @Description:
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
package timed
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"fmt"
|
|
|
|
|
|
"testing"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func TestTimeStampUtil(t *testing.T) {
|
|
|
|
|
|
fmt.Print("\n\n")
|
2020-08-18 17:29:42 +08:00
|
|
|
|
fmt.Println(GetNowHourUnix())
|
2020-05-07 16:14:37 +08:00
|
|
|
|
|
|
|
|
|
|
fmt.Print("\n\n")
|
2020-08-18 17:29:42 +08:00
|
|
|
|
fmt.Println(GetNowUnix())
|
2020-05-07 16:14:37 +08:00
|
|
|
|
|
|
|
|
|
|
fmt.Print("\n\n")
|
2020-08-18 17:29:42 +08:00
|
|
|
|
fmt.Println(GetZeroHourUnix())
|
2020-05-07 16:14:37 +08:00
|
|
|
|
|
|
|
|
|
|
fmt.Print("\n\n")
|
2020-08-18 17:29:42 +08:00
|
|
|
|
fmt.Println(GetNowYearUnix())
|
2020-05-07 16:14:37 +08:00
|
|
|
|
|
|
|
|
|
|
fmt.Print("\n\n")
|
2020-08-18 17:29:42 +08:00
|
|
|
|
fmt.Println(GetNowMonthUnix())
|
2020-05-07 16:14:37 +08:00
|
|
|
|
|
|
|
|
|
|
}
|