mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-02 01:39:14 +02:00
fixed timezone in database
This commit is contained in:
@@ -117,12 +117,13 @@ func convertWeeksToDates(events []model.Event, semester string, year string) []m
|
||||
}
|
||||
|
||||
func addTimeToDate(date time.Time, timeString string) time.Time {
|
||||
europeTime, _ := time.LoadLocation("Europe/Berlin")
|
||||
//convert time string to time
|
||||
timeParts := strings.Split(timeString, ":")
|
||||
hour, _ := strconv.Atoi(timeParts[0])
|
||||
minute, _ := strconv.Atoi(timeParts[1])
|
||||
|
||||
return time.Date(date.Year(), date.Month(), date.Day(), hour, minute, 0, 0, time.UTC)
|
||||
return time.Date(date.Year(), date.Month(), date.Day(), hour, minute, 0, 0, europeTime)
|
||||
}
|
||||
|
||||
func extractSemesterAndYear(semesterString string) (string, string) {
|
||||
|
Reference in New Issue
Block a user