Skip to content

Commit

Permalink
Merge pull request #563 from bubusuke/master
Browse files Browse the repository at this point in the history
feat(pgdriver): expose pgdriver.ParseTime
  • Loading branch information
vmihailenco authored Jun 10, 2022
2 parents a327b2a + 405a7d7 commit 666a70e
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 666a70e

Please sign in to comment.