time

package
v0.0.0-...-d8850a5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

时间

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDateTime

func NewDateTime(dateTime, timeLayout string) time.Time

NewDateTime 创建一个时间Time

func RfcToLocalDatetime

func RfcToLocalDatetime(rfcTime, layout string) string

RfcToLocalDatetime rfc时间格式化成指定的格式

func RfcToLocalTime

func RfcToLocalTime(rfcTime, layout string) int64

RfcToLocalTime rfc时间格式化成时间戳

func StrToTime

func StrToTime(datetime, timeLayout string) int64

StrToTime 字符串转时间戳

func Time

func Time() int64

Time 获取当前时间戳

func TimeToDate

func TimeToDate(timestamp int64, timeLayout string) string

TimeToDate 时间戳格式化 timestamp=0 默认为当前时间

Types

This section is empty.

Jump to

Keyboard shortcuts

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