Documentation ¶
Index ¶
- Constants
- Variables
- func ApiTimeFormat(t time.Time) string
- func GetAccurateTime() int64
- func GetCurrentTimezoneName() (string, error)
- func NowWithTimezoneName() (time.Time, int, string)
- func ParseApiTime(s string) (t time.Time, err error)
- func ToAccurateTime(t time.Time) int64
- func ToStableElapsedTime(t time.Time, base time.Time) time.Time
- func UtcNowStr() string
Constants ¶
View Source
const (
UnknownTimezoneName = "unknown"
)
Variables ¶
View Source
var (
ErrDetectSystemTimezoneName = errors.New("failed to detect TZ name in system")
)
Functions ¶
func ApiTimeFormat ¶
func GetAccurateTime ¶
func GetAccurateTime() int64
GetAccurateTime returns current time in millisecond precision
func GetCurrentTimezoneName ¶
GetCurrentTimezoneName returns full name in TZ database of system timezone setting. On *nix systems, cases below should be taken in account:
- When environment variable $TZ is absent, /etc/localtime should be used, which is mostly a symbolic link to tzfile under sources.
- $TZ=""
func ToAccurateTime ¶
ToAccurateTime returns specified time object in millisecond precision
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.