MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / MakeTimeTZFromTime

Function MakeTimeTZFromTime

pkg/util/timetz/timetz.go:71–76  ·  view source on GitHub ↗

MakeTimeTZFromTime creates a TimeTZ from a time.Time. It will be trimmed to microsecond precision.

(t time.Time)

Source from the content-addressed store, hash-verified

69// MakeTimeTZFromTime creates a TimeTZ from a time.Time.
70// It will be trimmed to microsecond precision.
71func MakeTimeTZFromTime(t time.Time) TimeTZ {
72 return MakeTimeTZFromLocation(
73 timeofday.New(t.Hour(), t.Minute(), t.Second(), t.Nanosecond()/1000),
74 t.Location(),
75 )
76}
77
78// Now returns the TimeTZ of the current location.
79func Now() TimeTZ {

Callers 2

NewDTimeTZFromTimeFunction · 0.92
NowFunction · 0.85

Calls 5

NewFunction · 0.92
MakeTimeTZFromLocationFunction · 0.85
HourMethod · 0.80
MinuteMethod · 0.80
SecondMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…