Documentation ¶
Overview ¶
***
高性能时间,精确到0.1秒
***
Index ¶
- Constants
- Variables
- func After(diff int) int64
- func DurationTo(days int, H, M, S int) time.Duration
- func FormatDay2Year(days int) string
- func FormatPrevLogin(tm time.Time) (st string)
- func FormatRunTime(tm time.Time) (st string)
- func FormatSec2Hour(tm int64) string
- func FormatSec2HourInt(tm int64) string
- func GetTimeStamp() int64
- func GetTimeStampFromStr(time_str string) (tms int64, e error)
- func GetWeekdayCN(t time.Time) (w string)
- func PrintDuration(key string, start time.Time, exceed time.Duration)
- func TmLime(tmflag string) (stm, etm string)
- func ToTime(v interface{}, layout ...string) (t time.Time, e error)
Constants ¶
View Source
const ( TIME_LAYOUT_1 = "2006-01-02 15:04:05" TIME_LAYOUT_2 = "2006-01-02" TIME_LAYOUT_3 = "2006-01-02T15:04:05Z" TIME_LAYOUT_4 = "2006年01月02日" TIME_LAYOUT_5 = "2006年01月" TIME_LAYOUT_6 = "2006年01月02日 15:04" TIME_LAYOUT_7 = "20060102" TIME_LAYOUT_8 = "01月02日" TIME_LAYOUT_9 = "Mon, 02 Jan 2006 15:04:05 MST" )
Variables ¶
View Source
var Local *time.Location
View Source
var Now time.Time
Functions ¶
func FormatDay2Year ¶
func FormatPrevLogin ¶
func FormatSec2Hour ¶
func FormatSec2HourInt ¶
func GetTimeStampFromStr ¶
获取当前时间戳,单位秒
func GetWeekdayCN ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.