ParseDTimeTZ parses and returns the *DTime Datum value represented by the provided string, or an error if parsing is unsuccessful. The dependsOnContext return value indicates if we had to consult the ParseContext (either for the time or the local timezone).
( ctx ParseContext, s string, precision time.Duration, )
| 2457 | // The dependsOnContext return value indicates if we had to consult the |
| 2458 | // ParseContext (either for the time or the local timezone). |
| 2459 | func ParseDTimeTZ( |
| 2460 | ctx ParseContext, s string, precision time.Duration, |
| 2461 | ) (_ *DTimeTZ, dependsOnContext bool, _ error) { |
| 2462 | now := relativeParseTime(ctx) |
| 2463 | d, dependsOnContext, err := timetz.ParseTimeTZ(now, dateStyle(ctx), s, precision) |
| 2464 | if err != nil { |
| 2465 | return nil, false, err |
| 2466 | } |
| 2467 | return NewDTimeTZ(d), dependsOnContext, nil |
| 2468 | } |
| 2469 | |
| 2470 | // ResolvedType implements the TypedExpr interface. |
| 2471 | func (*DTimeTZ) ResolvedType() *types.T { |
no test coverage detected
searching dependent graphs…