# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Methods | Inherited Methods

# TimeUtils

`public class TimeUtils`
`extends Object` ``

java.lang.Object
↳ | android.util.TimeUtils

A class containing utility methods related to time zones.

## Summary

### Public methods
`static TimeZone` | `getTimeZone(int offset, boolean dst, long when, String country)` Tries to return a time zone that would have had the specified offset and DST value at the specified moment in the specified country.
`static String` | `getTimeZoneDatabaseVersion()` Returns a String indicating the version of the time zone database currently in use.
`static List<String>` | `getTimeZoneIdsForCountryCode(String countryCode)` Returns time zone IDs for time zones known to be associated with a country.
`static boolean` | `isTimeBetween(LocalTime reference, LocalTime start, LocalTime end)` This method is used to find if a clock time is inclusively between two other clock times

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Public methods

### getTimeZone

    public static TimeZone getTimeZone (int offset,
                    boolean dst,
                    long when,
                    String country)

Tries to return a time zone that would have had the specified offset and DST value at the specified moment in the specified country. Returns null if no suitable zone could be found.

Parameters
`offset` | `int`
`dst` | `boolean`
`when` | `long`
`country` | `String`

Returns
`TimeZone` |

### getTimeZoneDatabaseVersion

    public static String getTimeZoneDatabaseVersion ()

Returns a String indicating the version of the time zone database currently in use. The format of the string is dependent on the underlying time zone database implementation, but will typically contain the year in which the database was updated plus a letter from a to z indicating changes made within that year.

Time zone database updates should be expected to occur periodically due to political and legal changes that cannot be anticipated in advance. Therefore, when computing the UTC time for a future event, applications should be aware that the results may differ following a time zone database update. This method allows applications to detect that a database change has occurred, and to recalculate any cached times accordingly.

The time zone database may be assumed to change only when the device runtime is restarted. Therefore, it is not necessary to re-query the database version during the lifetime of an activity.

Returns
`String` |

### getTimeZoneIdsForCountryCode

    public static List<String> getTimeZoneIdsForCountryCode (String countryCode)

Returns time zone IDs for time zones known to be associated with a country.

The list returned may be different from other on-device sources like `TimeZone.getRegion(String)` as it can be curated to avoid contentious or obsolete mappings.

Parameters
`countryCode` | `String`: the ISO 3166-1 alpha-2 code for the country as can be obtained using `Locale.getCountry()` This value cannot be `null`.

Returns
`List<String>` | IDs that can be passed to `TimeZone.getTimeZone(String)` or similar methods, or `null` if the countryCode is unrecognized

### isTimeBetween

    public static boolean isTimeBetween (LocalTime reference,
                    LocalTime start,
                    LocalTime end)

This method is used to find if a clock time is inclusively between two other clock times

Parameters
`reference` | `LocalTime`: The time of the day we want check if it is between start and end This value cannot be `null`.
`start` | `LocalTime`: The start time reference This value cannot be `null`.
`end` | `LocalTime`: The end time This value cannot be `null`.

Returns
`boolean` | true if the reference time is between the two clock times, and false otherwise.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*