diff --git a/Backend/database.go b/Backend/database.go index bf1c4de..1a6bf9e 100644 --- a/Backend/database.go +++ b/Backend/database.go @@ -13,7 +13,7 @@ func OpenDatabase() (*sql.DB, error) { dbUser := helper.GetEnv("POSTGRES_USER", "arbeit_zeit") dbPassword := helper.GetEnv("POSTGRES_PASS", "password") - connStr := fmt.Sprintf("postgres://%s:%s@%s:5432/%s?sslmode=disable", dbUser, dbPassword, dbHost, dbName) + connStr := fmt.Sprintf("postgres://%s:%s@%s:5432/%s?sslmode=disable&TimeZone=Europe/Berlin", dbUser, dbPassword, dbHost, dbName) return sql.Open("postgres", connStr) } diff --git a/Backend/models/booking.go b/Backend/models/booking.go index 4574e16..9290ae1 100644 --- a/Backend/models/booking.go +++ b/Backend/models/booking.go @@ -209,7 +209,7 @@ func checkLastBooking(b Booking) bool { func (b *Booking) UpdateTime(newTime time.Time){ hour, minute, _ := newTime.Clock() - if(hour == b.Timestamp.Local().Hour() && minute == b.Timestamp.Local().Minute()){ + if(hour == b.Timestamp.Hour() && minute == b.Timestamp.Minute()){ return } // TODO: add check for time overlap diff --git a/Backend/templates/timeComponents.templ b/Backend/templates/timeComponents.templ index 28ba16a..20e0175 100644 --- a/Backend/templates/timeComponents.templ +++ b/Backend/templates/timeComponents.templ @@ -122,7 +122,7 @@ templ lineComponent(){ templ bookingComponent(booking models.Booking) {
- {booking.Timestamp.Local().Format("15:04")} + {booking.Timestamp.Format("15:04")} {booking.GetBookingType()}