ttime

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2025 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFutureTimestamp

func GetFutureTimestamp(hours int) int

GetFutureTimestamp 获取未来时间戳, 单位为小时 1726766060。 Args: hours int 当前时间的未来/过去小时的数量。 Return: int 时间戳。 e.g.: Args 2, Returns 1726766060。

func GetNowTime

func GetNowTime() string

GetNowTime 获取当前时间 2024-09-29 16:42:19 Return: string 当前时间。 e.g.: Returns 2024-09-29 16:42:19。

func GetNowTimestamp

func GetNowTimestamp() string

GetNowTimestamp 获取当前时间戳 1726736060 Return: string 当前时间戳。 e.g.: Returns 1726736060。

func GetTimestampByTime

func GetTimestampByTime(timeStr string) (int, error)

GetTimestampByTime 传入时间字符串,如,获取时间戳 Args: timeStr string 时间字符串。 Return: int 时间戳, error 错误。 e.g.: Args 2006-01-02 15:04:05, Returns 1726736060,nil。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL