常用类型及数据操作方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
276 B

3 years ago
  1. package helper
  2. import (
  3. "testing"
  4. "time"
  5. )
  6. func Test_FormatDate(t *testing.T) {
  7. str := "1110"
  8. strconv := FormatDate(str)
  9. t.Log(strconv)
  10. timing := "2019/1/1 8:28"
  11. ret, err := time.ParseInLocation("2006/1/2 15:04", timing, time.Local)
  12. t.Log(ret.Unix())
  13. t.Log(err)
  14. }