Class GpxTimezone


  • public final class GpxTimezone
    extends java.lang.Object
    Timezone in hours.

    TODO: should probably be replaced by TimeZone.

    Since:
    14205 (extracted from CorrelateGpxWithImages)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double timezone  
      static GpxTimezone ZERO
      The timezone 0.
    • Constructor Summary

      Constructors 
      Constructor Description
      GpxTimezone​(double hours)
      Constructs a new GpxTimezone.
    • Constructor Detail

      • GpxTimezone

        public GpxTimezone​(double hours)
        Constructs a new GpxTimezone.
        Parameters:
        hours - timezone in hours
    • Method Detail

      • getHours

        public double getHours()
        Returns the timezone in hours.
        Returns:
        the timezone in hours
      • formatTimezone

        public java.lang.String formatTimezone()
        Formats time zone.
        Returns:
        formatted time zone. Format: ±HH:MM
      • parseTimezone

        public static GpxTimezone parseTimezone​(java.lang.String timezone)
                                         throws java.text.ParseException
        Parses timezone.
        Parameters:
        timezone - timezone. Expected format: ±HH:MM
        Returns:
        timezone
        Throws:
        java.text.ParseException - if timezone can't be parsed
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object