ParseTimestampTZ parses and returns the time.Time value represented by the provided string in the provided location, 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, )
| 2937 | // The dependsOnContext return value indicates if we had to consult the |
| 2938 | // ParseContext (either for the time or the local timezone). |
| 2939 | func ParseTimestampTZ( |
| 2940 | ctx ParseContext, s string, precision time.Duration, |
| 2941 | ) (_ time.Time, dependsOnContext bool, _ error) { |
| 2942 | now := relativeParseTime(ctx) |
| 2943 | t, dependsOnContext, err := pgdate.ParseTimestamp(now, dateStyle(ctx), s, dateParseHelper(ctx)) |
| 2944 | if err != nil { |
| 2945 | return time.Time{}, false, err |
| 2946 | } |
| 2947 | if t, err = roundAndCheck(t, precision); err != nil { |
| 2948 | return time.Time{}, false, err |
| 2949 | } |
| 2950 | return t, dependsOnContext, nil |
| 2951 | } |
| 2952 | |
| 2953 | // ParseDTimestampTZ parses and returns the *DTimestampTZ Datum value represented by |
| 2954 | // the provided string in the provided location, or an error if parsing is unsuccessful. |
no test coverage detected
searching dependent graphs…