Skip to content

Commit

Permalink
Changed to copy start end times directly as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
neboman11 committed Dec 4, 2023
1 parent 1d90670 commit c9a3d0d
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions parser/sectionParser.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,9 @@ func getMeetings(rowInfo map[string]string, classInfo map[string]string) []schem

meeting.Meeting_days = strings.Split(match[3], ", ")

startTime, err := time.ParseInLocation("3:04pm", match[4], timeLocation)
if err != nil {
panic(err)
}
meeting.Start_time = startTime

endTime, err := time.ParseInLocation("3:04pm", match[5], timeLocation)
if err != nil {
panic(err)
}
meeting.End_time = endTime
// Don't parse time into time object, adds unnecessary extra data
meeting.Start_time = match[4]

Check failure on line 134 in parser/sectionParser.go

View workflow job for this annotation

GitHub Actions / build_ubuntu

cannot use match[4] (variable of type string) as time.Time value in assignment

Check failure on line 134 in parser/sectionParser.go

View workflow job for this annotation

GitHub Actions / build_windows

cannot use match[4] (variable of type string) as time.Time value in assignment
meeting.End_time = match[5]

Check failure on line 135 in parser/sectionParser.go

View workflow job for this annotation

GitHub Actions / build_ubuntu

cannot use match[5] (variable of type string) as time.Time value in assignment

Check failure on line 135 in parser/sectionParser.go

View workflow job for this annotation

GitHub Actions / build_windows

cannot use match[5] (variable of type string) as time.Time value in assignment

// Only add location data if it's available
if len(match) > 6 {
Expand Down

0 comments on commit c9a3d0d

Please sign in to comment.