TimeZone.getAvailableIDs(int): This method is available in java.util.TimeZone class of Java.
Syntax:
String[] java.util.TimeZone.getAvailableIDs(int rawOffset)
This method takes one argument. This method gets the available IDs according to the given time zone offset in milliseconds.
Parameters: One parameter is required for this method.
rawOffset: the given time zone GMT offset in milliseconds.
Returns: an array of IDs, where the time zone for that ID has the specified GMT offset.
Exceptions: NA
Approach
Java
import java.util.Arrays;import java.util.TimeZone;public class TimeZonegetAvailableIDs2 {public static void main(String[] args) {int rawOffset = 100000;System.out.println(Arrays.toString(TimeZone.getAvailableIDs(rawOffset)));}}
Output:
[]
No comments:
Post a Comment