Documentation
¶
Overview ¶
功能:提供时间处理函数
Index ¶
- func ConvertDate(date string) string
- func GetHmsnNowCst() (h, m, s, n int)
- func GetHmsnNowUtc() (h, m, s, n int)
- func ISOCSTToISO(strISOCST string) string
- func ISOCSTToTime(strISOCST string) time.Time
- func ISOCSTToTs(strISOCST string) string
- func ISONow() string
- func ISONowCST() string
- func ISOToISOCST(strISO string) string
- func ISOToTime(strISO string) time.Time
- func ISOToTs(strISO string) string
- func TimeCSTToTs(tt time.Time) string
- func TimeToISO(tt time.Time) string
- func TimeToISOCST(tt time.Time) string
- func TimeToStr(tt time.Time, format string) string
- func TimeToTs(tt time.Time) string
- func TsNow() string
- func TsToISO(ts string) string
- func TsToISOCST(ts string) string
- func TsToStr(ts string, format string) string
- func TsToStrCST(ts string, format string) string
- func TsToTime(ts string) time.Time
- func TsToTimeCST(ts string) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertDate ¶
将 yyyymmdd 转为 yyyy-mm-ddT09:30:00Z 这个不算通用的,以后可以删去。
func ISOCSTToISO ¶
iso_cst to iso: 2021-10-07T18:48:57.443Z -> 2021-10-07T10:48:57.443Z
func ISOCSTToTime ¶
iso(CST) -> time: 2021-10-07T18:48:57.443Z -> time(2021-10-07 18:48:57.443 +0000 CST)
func ISOCSTToTs ¶
iso(CST) -> ts: 2021-10-07T18:48:57.443Z -> 1633603737443
func ISOToISOCST ¶
iso to iso_cst: 2021-10-07T10:48:57.443Z -> 2021-10-07T18:48:57.443Z
func TimeCSTToTs ¶
time(CST) -> ts: time(2021-10-07 18:48:57.443 +0000 CST) -> 1633603737443
func TimeToISO ¶
time(UTC) -> str: time(2021-10-07 10:48:57.443 +0000 UTC) -> 2021-10-07T10:48:57.443Z
func TimeToISOCST ¶
time(UTC) -> str: time(2021-10-07 10:48:57.443 +0000 UTC) -> 2021-10-07T10:48:57.443Z
func TimeToStr ¶
time(UTC) -> str: time(2021-10-07 10:48:57.443 +0000 UTC) -> 2021-10-07T10:48:57.443Z
func TsToISOCST ¶
ts -> ISO Str(CST): 1633603737443 -> 2021-10-07T18:48:57.443Z
func TsToStrCST ¶
ts -> Str(CST): 1633603737443 -> 2021-10-07T18:48:57.443Z (or other format)
func TsToTimeCST ¶
ts -> time(CST): 1633603737443 -> 2021-10-07 18:48:57.443 +0000 CST
Types ¶
This section is empty.