Interface TimeZone

All Known Implementing Classes:
TimeZone

public interface TimeZone
Abstracts a GWT timezone.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the daylight savings time adjustment, in minutes, for the given date.
    Returns the GMT representation of this time zone object.
    Returns time zone id for this time zone.
    To get ISO-style (+00:00) representation of the time zone for given date.
    Returns the long version of the time zone name for the given date; the result of this method will be different if daylight savings time is in effect.
    int
    Returns the RFC representation of the time zone name for the given date.
    To get RFC representation of certain time zone name for given date.
    Returns the short time zone name for a given date.
    int
    Returns the standard time zone offset, in minutes.
    boolean
    Check whether the given date and time falls within a daylight savings time period.
  • Method Details

    • getDaylightAdjustment

      int getDaylightAdjustment(Date date)
      Returns the daylight savings time adjustment, in minutes, for the given date. If daylight savings time is in effect on the given date, the number will be positive, otherwise 0.
      Parameters:
      date - the date to check
      Returns:
      offset amount
    • getGMTString

      String getGMTString(Date date)
      Returns the GMT representation of this time zone object.
      Parameters:
      date - The date from which the time information should be extracted
      Returns:
      A GMT representation of the time given by the date
    • getID

      String getID()
      Returns time zone id for this time zone. For time zone objects that have been instantiated from a time zone offset, the POSIX time zone id will be returned.
      Returns:
      time zone id
    • getISOTimeZoneString

      String getISOTimeZoneString(Date date)
      To get ISO-style (+00:00) representation of the time zone for given date.
      Parameters:
      date - The date for which time to retrieve RFC time zone string
      Returns:
      ISO-style time zone string
    • getLongName

      String getLongName(Date date)
      Returns the long version of the time zone name for the given date; the result of this method will be different if daylight savings time is in effect.
      Parameters:
      date - The date for which the long time zone name is returned
      Returns:
      long time zone name
    • getOffset

      int getOffset(Date date)
      Returns the RFC representation of the time zone name for the given date. To be consistent with JDK/Javascript API, west of Greenwich will be positive.
      Parameters:
      date - The date for which time to retrieve time zone offset
      Returns:
      time zone offset in minutes
    • getRFCTimeZoneString

      String getRFCTimeZoneString(Date date)
      To get RFC representation of certain time zone name for given date.
      Parameters:
      date - The date for which time to retrieve RFC time zone string
      Returns:
      RFC time zone string
    • getShortName

      String getShortName(Date date)
      Returns the short time zone name for a given date.
      Parameters:
      date - The date for which time to retrieve short time zone
      Returns:
      short time zone name
    • getStandardOffset

      int getStandardOffset()
      Returns the standard time zone offset, in minutes.
    • isDaylightTime

      boolean isDaylightTime(Date date)
      Check whether the given date and time falls within a daylight savings time period.
      Parameters:
      date - and time to check
      Returns:
      true if daylight savings time is in effect