Documentation ¶
Index ¶
- func China() *time.Location
- func Format(t time.Time, layout string) string
- func FormatNow(layout string) string
- func Now() time.Time
- func NowString() string
- func Parse(layout, value string) (time.Time, error)
- func ParseInChina(layout, value string) (time.Time, error)
- func TimeFromUnix(sec int64) time.Time
- func TimeFromUnixMicro(msec uint64) time.Time
- func TimeFromUnixNano(nsec uint64) time.Time
- func TimeString() string
- func ToChina(t time.Time) time.Time
- func TodayString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Now ¶
Now returns the current time, and set location information to China for display purposes.
func ParseInChina ¶
ParseInChina 解析时间字符串(基于 GMT+8)
func TimeFromUnixMicro ¶
TimeFromUnixMicro 使用微秒级时间戳获取时间对象
func TimeFromUnixNano ¶
TimeFromUnixNano 使用纳秒级时间戳获取时间对象
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.