MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / MakeDTimestampTZ

Function MakeDTimestampTZ

pkg/sql/sem/tree/datum.go:2903–2908  ·  view source on GitHub ↗

MakeDTimestampTZ creates a DTimestampTZ with specified precision.

(t time.Time, precision time.Duration)

Source from the content-addressed store, hash-verified

2901
2902// MakeDTimestampTZ creates a DTimestampTZ with specified precision.
2903func MakeDTimestampTZ(t time.Time, precision time.Duration) (_ *DTimestampTZ, err error) {
2904 if t, err = roundAndCheck(t, precision); err != nil {
2905 return nil, err
2906 }
2907 return &DTimestampTZ{Time: t}, nil
2908}
2909
2910// MustMakeDTimestampTZ wraps MakeDTimestampTZ but panics if there is an error.
2911// This is intended for testing applications only.

Callers 4

MustMakeDTimestampTZFunction · 0.85
MakeDTimestampTZFromDateFunction · 0.85
RoundMethod · 0.85
AddTimeZoneMethod · 0.85

Calls 1

roundAndCheckFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…