Package org.n52.io

Class 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 Detail

      • IntervalWithTimeZone

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

      • getTimezone

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

        public org.joda.time.Interval toInterval()