utime

package
v0.0.0-...-da86336 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Utc = UtcTime{}

Utc is a UtcTime instance.

Functions

func TimeToTimestamptz

func TimeToTimestamptz(t time.Time) pgtype.Timestamptz

TimeToTimestamptz converts time.Time to pgtype.Timestamptz.

func TimestamptzToTime

func TimestamptzToTime(t pgtype.Timestamptz) time.Time

TimestamptzToTime converts pgtype.Timestamptz to time.Time.

Types

type UtcTime

type UtcTime time.Time

UtcTime is a type for time in UTC.

func (UtcTime) ISOStringToTime

func (t UtcTime) ISOStringToTime(iso8601 string) (time.Time, error)

ISOStringToTime converts ISO8601 string to time.Time.

func (UtcTime) Now

func (t UtcTime) Now() time.Time

Now returns the current time in UTC.

func (UtcTime) UnixToTime

func (t UtcTime) UnixToTime(sec int64, nsec int64) time.Time

UnixToTime converts Unix time to time.Time.

Jump to

Keyboard shortcuts

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