Documentation ¶
Index ¶
Constants ¶
View Source
const ( FormatDateTime = "2006-01-02 15:04:05" FormatDate = "2006-01-02" FormatTime = "15:04:05" TimeZoneSH = "Asia/Shanghai" )
Variables ¶
Functions ¶
func IntToString ¶
IntToString 将int转换为时间字符串 例如: 1560000000 -> 2019-06-09 00:00:00
func IntToStringDate ¶
IntToStringDate 将int转换为日期字符串 例如: 1560000000 -> 2019-06-09
func IntToStringTime ¶
IntToStringTime 将int转换为时间字符串 例如: 1560000000 -> 00:00:00
func NowTimeStr ¶ added in v0.2.3
func NowTimeStr() string
NowTimeStr 获取当前时间字符串 例如: 2019-06-09 00:00:00
func StringToInt ¶
StringToInt 将时间字符串转换为int 例如: 2019-06-09 00:00:00 -> 1560000000
Types ¶
type JsonTime ¶
func (JsonTime) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.