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

Method stripTimeZone

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

stripTimeZone removes the time zone from this TimestampTZ. For example, a TimestampTZ '2012-01-01 12:00:00 +02:00' would become '2012-01-01 12:00:00'.

(ctx *EvalContext)

Source from the content-addressed store, hash-verified

2484// TimestampTZ '2012-01-01 12:00:00 +02:00' would become
2485// '2012-01-01 12:00:00'.
2486func (d *DTimestampTZ) stripTimeZone(ctx *EvalContext) *DTimestamp {
2487 return d.EvalAtTimeZone(ctx, ctx.GetLocation())
2488}
2489
2490// EvalAtTimeZone evaluates this TimestampTZ as if it were in the supplied
2491// location, returning a timestamp without a timezone.

Callers 2

eval.goFile · 0.80
PerformCastFunction · 0.80

Calls 2

EvalAtTimeZoneMethod · 0.95
GetLocationMethod · 0.45

Tested by

no test coverage detected