useDaylightTime(): This method is available in java.util.TimeZone class of Java.
Syntax:
boolean java.util.TimeZone.useDaylightTime()
This method queries if this TimeZone uses Daylight Saving Time.
Parameters: NA
Returns: true if this TimeZone uses Daylight Saving Time, false, otherwise.
Exceptions: NA
Approach
Java
import java.util.SimpleTimeZone;import java.util.TimeZone;public class TimeZoneuseDaylightTime {public static void main(String[] args) {TimeZone timeZone = new SimpleTimeZone(100, "US");System.out.println(timeZone.useDaylightTime());}}
Output:
false
No comments:
Post a Comment