Documentation ¶
Index ¶
- Constants
- func AddDay(baseTime int64, days int) time.Time
- func AddHour(baseTime int64, hours int) time.Time
- func AddMinute(baseTime int64, minutes int) time.Time
- func AddMonth(basetime int64, md int) time.Time
- func AddSecond(baseTime int64, second int) time.Time
- func CurrentTime() string
- func CurrentTimestamp() int64
- func ExecBashShell(cmdLine string) (string, error)
- func FormatUnixTime(t int64) string
- func GetData() string
- func GetDay(seconds int) (int, int, int, int)
- func GetFullTime() string
- func GetHour(seconds int) (int, int, int)
- func GetMinute(seconds int) (int, int)
- func GetTime() string
- func GetTimeZone() int
- func GetTimeZoneCity(num int) string
- func GetTimeZoneTime(timestamp int64, value int) time.Time
- func GetWeek(seconds int) (int, int, int, int, int)
- func GetWeekDay(Year, Month, Day string) string
- func IsToday(newtime string) bool
- func OneMonth(year int, month int) (int, time.Duration, error)
- func SetLinuxSystemTime(tt int64) error
- func SetLinuxTimeZone(tz int) error
- func TimeDifference(oldTime, newTime string) int
- func TimeZoneFormat(value int) string
- func TimestampToLocal(t int64) string
- func TrucHour(baseTime int64) time.Time
- type FormatTime
Constants ¶
View Source
const ( ZeroTime = time.Second * 0 OneSecond = time.Second * 1 OneMinute = OneSecond * 60 OneHour = OneMinute * 60 OneDay = OneHour * 24 OneWeek = OneDay * 7 OneYear = OneDay * 365 )
当前页面,都是时间类型(time.Duration)的值,不做其他用途
Variables ¶
This section is empty.
Functions ¶
func GetTimeZoneTime ¶
参数:时间戳,时区(-12到12)。获取相应时区的时间
func TimeDifference ¶
Types ¶
type FormatTime ¶
func (*FormatTime) ToString ¶
func (t *FormatTime) ToString() string
func (*FormatTime) ToUnix ¶
func (t *FormatTime) ToUnix() int64
Click to show internal directories.
Click to hide internal directories.