2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.boschindego.internal.dto.response.weather;
15 import java.time.Instant;
16 import java.time.ZonedDateTime;
17 import java.time.format.DateTimeParseException;
19 import com.google.gson.annotations.SerializedName;
24 * @author Jacob Laursen - Initial contribution
26 public class Interval {
28 @SerializedName("dateTime")
31 public int intervalLength;
33 @SerializedName("prrr")
37 public float temperature;
39 public void setDate(final Instant date) {
40 this.date = date.toString();
43 public Instant getDate() {
45 return ZonedDateTime.parse(date).toInstant();
46 } catch (final DateTimeParseException e) {