Documentation ¶
Index ¶
- Constants
- func AddDuration(t time.Time, duration string) (time.Time, error)
- func FormatTimestamp(ts int64, layout string) string
- func GetCurrentMilliTimestamp() int64
- func GetCurrentTime() string
- func GetCurrentTimestamp() int64
- func ParseTime(value string) (time.Time, error)
- func ParseTimeWithFormat(value, layout string) (time.Time, error)
- func StandardFormat(ts int64) string
- func SubtractTimes(t1, t2 time.Time) time.Duration
Constants ¶
View Source
const ( STANDARD_FORMAT = "2006-01-02 15:04:05" DATE_FORMAT = "2006-01-02" MONTH_FORMAT = "2006-01" FLAT_DATE = "20060102" FLAT_FORMAT = "20060102150405" )
常量:时间格式
Variables ¶
This section is empty.
Functions ¶
func AddDuration ¶
AddDuration 给指定时间增加指定的时间间隔
func FormatTimestamp ¶
FormatTimestamp 格式化时间戳为指定格式
func GetCurrentMilliTimestamp ¶
func GetCurrentMilliTimestamp() int64
GetCurrentMilliTimestamp 获取当前时间戳(毫秒级)
func ParseTimeWithFormat ¶
ParseTimeWithFormat 按指定格式解析时间字符串
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.