Skip to content

Commit a6b77b6

Browse files
angelamayxiejycor
andauthored
Update sql/types/datetime.go
Co-authored-by: James Cor <[email protected]>
1 parent 3544b8a commit a6b77b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/types/datetime.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,8 @@ func (t datetimeType) parseDatetime(value string) (time.Time, bool, error) {
388388
return time.Time{}, false, nil
389389
}
390390

391-
func findEnd(value string, end int) int {
391+
// findDatetimeEnd returns the index of the last digit before `end`
392+
func findDatetimeEnd(value string, end int) int {
392393
for end > 0 {
393394
char := rune(value[end-1])
394395
if unicode.IsDigit(char) {

0 commit comments

Comments
 (0)