package common import ( "testing" "time" ) func TestTime2Second(t *testing.T) { t.Log(Time2Second(time.Now())) } func TestTime2StdString(t *testing.T) { t.Log(Time2StdString(time.Now())) } func TestGetTimeYesterday(t *testing.T) { t.Log(GetTimeYesterday().Format(FromatTime_V1)) } func TestSecond2Time(t *testing.T) { t.Log(Second2Time(GetCurrentSeconds()).Format(FromatTime_V1)) } func TestGetCurrentSeconds(t *testing.T) { t.Log(GetCurrentSeconds()) } func TestTimeIsZero(t *testing.T) { t.Log(TimeIsZero(time.Time{})) } func TestGetTimeStart(t *testing.T) { t.Log(GetTimeStart(time.Now()).Format(FromatTime_V1)) } func TestStringStd2Time(t *testing.T) { t.Log(StringStd2Time("2020-10-11 10:24:00").Format(FromatTime_V1)) } // 11-24 func TestGetTomorrow(t *testing.T) { t.Log(GetTomorrow(time.Now()).Format(FromatTime_V1)) } // 11-24 func TestGetYesterday(t *testing.T) { t.Log(GetYesterday(time.Now()).Format(FromatTime_V1)) } func TestNewTimeWithYearAndMonthAndDay(t *testing.T) { t.Log(NewTimeWithYearAndMonthAndDay(2020, 10, 35).Format(FromatTime_V1)) }