time

package
v0.0.0-...-b93445a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GTimeMgr = NewMgr()

Functions

This section is empty.

Types

type Mgr

type Mgr struct {
	UTCSwitch xcontrol.ISwitchButton // UTC 时间开关
	// contains filtered or unexported fields
}

Mgr 时间管理器

func NewMgr

func NewMgr() *Mgr

func (*Mgr) GetDayStartTimestampFromTime

func (p *Mgr) GetDayStartTimestampFromTime(t *time.Time) int64

GetDayStartTimestampFromTime 当天开始时间戳

func (*Mgr) GetDayStartTimestampFromTimestamp

func (p *Mgr) GetDayStartTimestampFromTimestamp(timestamp int64) int64

GetDayStartTimestampFromTimestamp 返回给定时间戳所在天的开始时间戳

func (*Mgr) GetMillisecond

func (p *Mgr) GetMillisecond() int64

GetMillisecond 获取-毫秒时间戳

func (*Mgr) GetTime

func (p *Mgr) GetTime() time.Time

func (*Mgr) GetTimestampOffset

func (p *Mgr) GetTimestampOffset() int64

GetTimestampOffset 获取 时间戳偏移量-秒

func (*Mgr) GetYMDFromTimestamp

func (p *Mgr) GetYMDFromTimestamp(timestamp int64) int

GetYMDFromTimestamp 获取 e.g.:20210819

返回YMD

func (*Mgr) NowTime

func (p *Mgr) NowTime() time.Time

NowTime 获取当前时间

func (*Mgr) SetTimestampOffset

func (p *Mgr) SetTimestampOffset(offset int64)

SetTimestampOffset 设置 时间戳偏移量-秒

func (*Mgr) ShadowTimestamp

func (p *Mgr) ShadowTimestamp() int64

ShadowTimestamp 叠加偏移量的时间戳-秒

func (*Mgr) Update

func (p *Mgr) Update()

Update 更新时间管理器中的,当前时间

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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