timeutil

package
Version: v1.0.1-0...-754ee47 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BeijingZone *time.Location
View Source
var DefaultFormat = "2006-01-02 15:04:05"
View Source
var StringFormat = "20060102150405"

Functions

func GetBeijingLastDateOfMonth

func GetBeijingLastDateOfMonth(d time.Time) time.Time

获取传入的时间所在月份的最后一天,即某月最后一天的0点。如传入time.Now(), 返回当前月份的最后一天0点时间。

func GetBeijingMonthStartTime

func GetBeijingMonthStartTime(time time.Time) time.Time

本月开始时间

func GetBeijingNowTimeString

func GetBeijingNowTimeString() string

func GetBeijingNowTimeStringFormat

func GetBeijingNowTimeStringFormat(format string) string

func GetBeijingTimeString

func GetBeijingTimeString(unix int64) string

func GetBeijingZeroTime

func GetBeijingZeroTime(d time.Time) time.Time

获取零点时间

func GetNowUtcTimeString

func GetNowUtcTimeString() string

func GetTimeNow

func GetTimeNow() *time.Time

func ParseBeijingTime

func ParseBeijingTime(str, format string) (time.Time, error)

func SqlNullTime

func SqlNullTime(t *time.Time) gorm.DeletedAt

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL