Skip to content

Commit

Permalink
feat(pgdriver): expose pgdriver.ParseTime
Browse files Browse the repository at this point in the history
  • Loading branch information
bubusuke committed Jun 9, 2022
1 parent a327b2a commit 405a7d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions driver/pgdriver/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func readTimeCol(rd *reader, n int) (interface{}, error) {
return time.Time{}, err
}

tm, err := parseTime(bytesToString(tmp))
tm, err := ParseTime(bytesToString(tmp))
if err != nil {
return time.Time{}, err
}
Expand All @@ -162,7 +162,7 @@ const (
timestamptzFormat3 = "2006-01-02 15:04:05.999999999-07"
)

func parseTime(s string) (time.Time, error) {
func ParseTime(s string) (time.Time, error) {
switch l := len(s); {
case l < len("15:04:05"):
return time.Time{}, fmt.Errorf("pgdriver: can't parse time=%q", s)
Expand Down

0 comments on commit 405a7d7

Please sign in to comment.