Package csw.time.core

Class TMTTimeHelper

java.lang.Object
csw.time.core.TMTTimeHelper

public class TMTTimeHelper extends Object
This API allows users to get a representation of TMTTime in a specific Time Zone, returned as a java.time.ZonedDateTime.
  • Constructor Details

    • TMTTimeHelper

      public TMTTimeHelper()
  • Method Details

    • atZone

      public static ZonedDateTime atZone(TMTTime tmtTime, ZoneId zoneId)
      Combines the TMTTime with the given timezone to get a java.time.ZonedDateTime

      Parameters:
      zoneId - id of the required zone
      tmtTime - (undocumented)
      Returns:
      time at the given zone
    • atLocal

      public static ZonedDateTime atLocal(TMTTime tmtTime)
      Combines the TMTTime with the Local timezone to get a java.time.ZonedDateTime. Local timezone is the system's default timezone.

      Parameters:
      tmtTime - (undocumented)
      Returns:
      time at the Local zone
    • atHawaii

      public static ZonedDateTime atHawaii(TMTTime tmtTime)
      Combines the TMTTime with the Hawaii timezone to get a java.time.ZonedDateTime.

      Parameters:
      tmtTime - (undocumented)
      Returns:
      time at the Hawaii-Aleutian Standard Time (HST) zone
    • toZonedDateTime

      public static ZonedDateTime toZonedDateTime(TMTTime tmtTime)
      Converts the TMTTime instance to java.time.ZonedDateTime by adding 0 offset of UTC timezone.

      Parameters:
      tmtTime - (undocumented)
      Returns:
      zoned representation of the TMTTime