+ Time2TimeStr

This commit is contained in:
gazebo
2019-03-30 15:03:11 +08:00
parent f932b92dbe
commit e8c84c3b21

View File

@@ -299,6 +299,10 @@ func Time2Str(t time.Time) string {
return t.Format("2006-01-02 15:04:05")
}
func Time2TimeStr(t time.Time) string {
return t.Format("15:04:05")
}
func Str2Time(timeStr string) time.Time {
retVal, err := TryStr2Time(timeStr)
if err != nil {