Documentation ¶
Index ¶
- Variables
- func Date(format string, timestamp int64) string
- func FormatNow() string
- func FormatTime(t time.Time) string
- func FormatTime19(t time.Time) string
- func FormatUTC() string
- func GetCurrentLocalTime() string
- func GetLoc(zone string) *time.Location
- func GetTimeByTimeZone(zone string) string
- func NumberNow() uint64
- func NumberTime(t time.Time) uint64
- func NumberUTC() uint64
- func ParseNumber(t uint64) (time.Time, error)
- func ParseNumberUTC(t uint64) (time.Time, error)
- func ParseTime(s string) (time.Time, error)
- func ParseTimeUTC(s string) (time.Time, error)
- func SetTimeZone(zone string)
- func Sleep(t int64)
- func Strtotime(format, strtime string) (int64, error)
- func Time() int64
- func Usleep(t int64)
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeZone = "Asia/Shanghai"
TimeZone 默认时区设置,可以是Local本地时区
Functions ¶
func FormatTime ¶
FormatTime format a time.Time to string as 2006-01-02 15:04:05.999
func FormatTime19 ¶
FormatTime19 format a time.Time to string as 2006-01-02 15:04:05 将time.time转换为日期格式
func GetTimeByTimeZone ¶
GetTimeByTimeZone get time by zone.
func NumberTime ¶
NumberTime format a time.Time to number as 20060102150405999
func ParseNumberUTC ¶
ParseNumberUTC parset t to utc time
func ParseTimeUTC ¶
ParseTimeUTC parse a string as "2006-01-02 15:04:05.999" to time.Time
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.