code: private boolean updateChargingStationOpeningTimes(ChargingStationOpeningTimesChangedEvent event, boolean clear) {
          ChargingStation chargingStation = repository.findOne(event.getChargingStationId().getId());
  
          if (chargingStation != null) {
              if (!event.getOpeningTimes().isEmpty()) {
                  if (clear) {
                      chargingStation.getOpeningTimes().clear();
                  }
  
                  for (OpeningTime coreOpeningTime : event.getOpeningTimes()) {
                      Day dayOfWeek = coreOpeningTime.getDay();
                      String timeStart = String.format(TIME_FORMAT, coreOpeningTime.getTimeStart().getHourOfDay(), coreOpeningTime.getTimeStart().getMinutesInHour());
                      String timeStop = String.format(TIME_FORMAT, coreOpeningTime.getTimeStop().getHourOfDay(), coreOpeningTime.getTimeStop().getMinutesInHour());
  
                      io.motown.operatorapi.viewmodel.persistence.entities.OpeningTime openingTime = new io.motown.operatorapi.viewmodel.persistence.entities.OpeningTime(dayOfWeek, timeStart, timeStop);
                      chargingStation.getOpeningTimes().add(openingTime);
                  }
  
                  repository.createOrUpdate(chargingStation);
              }
  
          } else {
              LOG.error("operator api repo COULD NOT FIND CHARGEPOINT {} and update its opening times", event.getChargingStationId());
          }
  
          return chargingStation != null;
      }
docs: Updates the opening times of the charging station.
  
  @param event The event which contains the opening times.
  @param clear Whether to clear the opening times or not.
  @return {@code true} if the update has been performed, {@code false} if the charging station can't be found.