常用类型及数据操作方法
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.

28 lines
545 B

3 years ago
3 years ago
3 years ago
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. // }
  15. // func Test_GetToadyStartTimeStamp(t *testing.T) {
  16. // t.Log(GetMonthStartTimeStamp())
  17. // }
  18. func Test_RFC3339ToCSTLayout(t *testing.T) {
  19. cur := "2018-06-08T10:34:56+08:00"
  20. ret, err := RFC3339ToCSTLayout(cur)
  21. t.Log(ret)
  22. t.Log(err)
  23. }