ParseTimestamp parses Postgres' text format. It returns a time.Time in currentLocation iff that time's offset agrees with the offset sent from the Postgres server. Otherwise, ParseTimestamp returns a time.Time with the fixed offset offset provided by the Postgres server.
(currentLocation *time.Location, str string)
| 319 | // Postgres server. Otherwise, ParseTimestamp returns a time.Time with the fixed |
| 320 | // offset offset provided by the Postgres server. |
| 321 | func ParseTimestamp(currentLocation *time.Location, str string) (time.Time, error) { |
| 322 | return pqtime.Parse(currentLocation, str) |
| 323 | } |
| 324 | |
| 325 | // formatTS formats t into a format postgres understands. |
| 326 | func formatTS(t time.Time) []byte { |