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.

32 lines
705 B

  1. package utils
  2. import (
  3. "time"
  4. )
  5. /*
  6. 前面是含义后面是 go 的表示值,多种表示,逗号","分割
  7.   06,2006
  8. 月份 1,01,Jan,January
  9.   2,02,_2
  10.   3,03,15,PM,pm,AM,am
  11.   4,04
  12.   5,05
  13. 周几 Mon,Monday
  14. 时区时差表示 -07,-0700,Z0700,Z07:00,-07:00,MST
  15. 时区字母缩写 MST
  16. 您看出规律了么哦是的你发现了这里面没有一个是重复的所有的值表示都唯一对应一个时间部分
  17. 并且涵盖了很多格式组合
  18. */
  19. const (
  20. // 时间格式化字符串
  21. SysTimeform string = "2006-01-02 15:04:05"
  22. SysTimeformShort string = "2006-01-02"
  23. //
  24. )
  25. // 中国时区
  26. var SysTimeLocation, _ = time.LoadLocation("Asia/Chongqing")