Package org.n52.io

Class IntervalWithTimeZone

java.lang.Object
org.n52.io.IntervalWithTimeZone

public class IntervalWithTimeZone extends Object

Wraps a JodaTime Interval to retain timezone information. The API needs the given timezone information as a best guess to respond timeseries data in a proper manner. JodaTime stores time instants (having no timezone per se) along the interval, so timezone information is available once the timespan string has been parsed.

See Also:
  • Constructor Details

    • IntervalWithTimeZone

      public IntervalWithTimeZone(String timespan)
      Parameters:
      timespan - the time interval in ISO8601 notation.
      Throws:
      IllegalArgumentException - if timespan is not a valid interval.
  • Method Details

    • getTimezone

      public org.joda.time.DateTimeZone getTimezone()
    • toInterval

      public org.joda.time.Interval toInterval()
    • toString

      public String toString()
      Overrides:
      toString in class Object