time

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const TimeFormat = "2006-01-02 15:04:05"

TimeFormat 2006-01-02 15:04:05

View Source
const TimeFormatTZ = "2006-01-02 15:04:05 -0700 MST"

TimeFormatTZ 2006-01-02 15:04:05

Variables

View Source
var ChinaTimeZone = func() *time.Location {
	tz, err := time.LoadLocation("Asia/Shanghai")
	if err != nil {
		tz = time.UTC
	}
	return tz
}()

ChinaTimeZone UTC +8 timezone

Functions

func FromString

func FromString(str string) int64

FromString from time string like 2006-01-02 15:04:05

func ToString

func ToString(t int64) string

ToString transfer time.Time to 2006-01-02 15:04:05 string

Types

This section is empty.

Jump to

Keyboard shortcuts

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